/**
 *
 */
import Util;
import ROAUtil;
import Credential;
import AccessTokenCredential;

type @domainId = string
type @accessTokenCredential = AccessTokenCredential
type @endpoint = string
type @protocol = string
type @nickname = string
type @userAgent = string
type @credential = Credential

model RuntimeOptions {
  autoretry?: boolean(description='whether to try again', name='autoretry'),
  ignoreSSL?: boolean(description='ignore SSL validation', name='ignoreSSL'),
  maxAttempts?: number(description='maximum number of retries', name='maxAttempts'),
  backoffPolicy?: string(description='backoff policy', name='backoffPolicy'),
  backoffPeriod?: number(description='backoff period', name='backoffPeriod'),
  readTimeout?: number(description='read timeout', name='readTimeout'),
  connectTimeout?: number(description='connect timeout', name='connectTimeout'),
  httpProxy?: string(description='http proxy url', name='httpProxy'),
  httpsProxy?: string(description='https Proxy url', name='httpsProxy'),
  noProxy?: string(description='agent blacklist', name='noProxy'),
  maxIdleConns?: number(description='maximum number of connections', name='maxIdleConns'),
  localAddr?: string(description='local addr', name='localAddr'),
  socks5Proxy?: string(description='SOCKS5 proxy', name='socks5Proxy'),
  socks5NetWork?: string(description='SOCKS5 netWork', name='socks5NetWork'),
}

model Config {
  endpoint?: string,
  domainId?: string(pattern='^[a-zA-Z0-9_-]+$'),
  clientId?: string,
  refreshToken?: string,
  clientSecret?: string,
  accessToken?: string,
  expireTime?: string,
  protocol?: string,
  type?: string,
  securityToken?: string,
  accessKeyId?: string,
  accessKeySecret?: string,
  nickname?: string,
  userAgent?: string,
}


init(config: Config){
  if (Util.isUnset(config)) {
    throw {
      name = "ParameterMissing",
      message = "'config' can not be unset"
    };
  }
  Util.validateModel(config);

  if (!Util.empty(config.accessToken) || !Util.empty(config.refreshToken)) {
    var accessConfig = new AccessTokenCredential.Config{
      accessToken =  config.accessToken,
      endpoint = config.endpoint,
      domainId =  config.domainId,
      clientId = config.clientId,
      refreshToken = config.refreshToken,
      clientSecret =  config.clientSecret,
      expireTime = config.expireTime,
    };
    @accessTokenCredential = new AccessTokenCredential(accessConfig);
  }
  if (!Util.empty(config.accessKeyId)) {
    if (Util.empty(config.type)) {
      config.type = 'access_key';
    }
    var credentialConfig = new Credential.Config{
      accessKeyId =  config.accessKeyId,
      type = config.type,
      accessKeySecret =  config.accessKeySecret,
      securityToken = config.securityToken,
    };
    @credential = new Credential(credentialConfig);
  }
  @endpoint = config.endpoint;
  @protocol = config.protocol;
  @userAgent = config.userAgent;
  @nickname = config.nickname;
  @domainId = config.domainId;
}

model CancelLinkModel {
  headers?: map[string]string(name='headers'),
  body: AccountAccessTokenResponse(name='body'),
}

/**
 * 取消绑定关系，生成新用户，返回访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function cancelLink(request: CancelLinkRequest) throws: CancelLinkModel  {
  var runtime = new RuntimeOptions{};
  return cancelLinkEx(request, runtime);
}

/**
 * 取消绑定关系，生成新用户，返回访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api cancelLinkEx(request: CancelLinkRequest, runtime: RuntimeOptions): CancelLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/cancel_link`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ConfirmLinkModel {
  headers?: map[string]string(name='headers'),
  body: AccountAccessTokenResponse(name='body'),
}

/**
 * 确认绑定关系, 成功后返回访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function confirmLink(request: ConfirmLinkRequest) throws: ConfirmLinkModel  {
  var runtime = new RuntimeOptions{};
  return confirmLinkEx(request, runtime);
}

/**
 * 确认绑定关系, 成功后返回访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api confirmLinkEx(request: ConfirmLinkRequest, runtime: RuntimeOptions): ConfirmLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/confirm_link`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SetPasswordModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 设置手机登录密码，密码必须包含数字和字母，长度8-20个字符
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function setPassword(request: DefaultSetPasswordRequest) throws: SetPasswordModel  {
  var runtime = new RuntimeOptions{};
  return setPasswordEx(request, runtime);
}

/**
 * 设置手机登录密码，密码必须包含数字和字母，长度8-20个字符
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api setPasswordEx(request: DefaultSetPasswordRequest, runtime: RuntimeOptions): SetPasswordModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/default/set_password`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model VerifyCodeModel {
  headers?: map[string]string(name='headers'),
  body: VerifyCodeResponse(name='body'),
}

/**
 * 校验手机短信验证码，用于重置密码时校验手机，通过校验后返回state，可通过state重新设置密码
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function verifyCode(request: VerifyCodeRequest) throws: VerifyCodeModel  {
  var runtime = new RuntimeOptions{};
  return verifyCodeEx(request, runtime);
}

/**
 * 校验手机短信验证码，用于重置密码时校验手机，通过校验后返回state，可通过state重新设置密码
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api verifyCodeEx(request: VerifyCodeRequest, runtime: RuntimeOptions): VerifyCodeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/default/verify_code`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetAccessTokenByLinkInfoModel {
  headers?: map[string]string(name='headers'),
  body: AccountAccessTokenResponse(name='body'),
}

/**
 * 管理员通过账号信息直接获取用户的访问令牌
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function getAccessTokenByLinkInfo(request: GetAccessTokenByLinkInfoRequest) throws: GetAccessTokenByLinkInfoModel  {
  var runtime = new RuntimeOptions{};
  return getAccessTokenByLinkInfoEx(request, runtime);
}

/**
 * 管理员通过账号信息直接获取用户的访问令牌
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getAccessTokenByLinkInfoEx(request: GetAccessTokenByLinkInfoRequest, runtime: RuntimeOptions): GetAccessTokenByLinkInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_access_token_by_link_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetLinkInfoModel {
  headers?: map[string]string(name='headers'),
  body: LinkInfoResponse(name='body'),
}

/**
 * 获取用户认证方式详情
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function getLinkInfo(request: GetByLinkInfoRequest) throws: GetLinkInfoModel  {
  var runtime = new RuntimeOptions{};
  return getLinkInfoEx(request, runtime);
}

/**
 * 获取用户认证方式详情
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getLinkInfoEx(request: GetByLinkInfoRequest, runtime: RuntimeOptions): GetLinkInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_link_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetLinkInfoByUserIdModel {
  headers?: map[string]string(name='headers'),
  body: LinkInfoListResponse(name='body'),
}

/**
 * 获取用户的所有绑定信息
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function getLinkInfoByUserId(request: GetLinkInfoByUserIDRequest) throws: GetLinkInfoByUserIdModel  {
  var runtime = new RuntimeOptions{};
  return getLinkInfoByUserIdEx(request, runtime);
}

/**
 * 获取用户的所有绑定信息
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getLinkInfoByUserIdEx(request: GetLinkInfoByUserIDRequest, runtime: RuntimeOptions): GetLinkInfoByUserIdModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_link_info_by_user_id`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetPublicKeyModel {
  headers?: map[string]string(name='headers'),
  body: GetPublicKeyResponse(name='body'),
}

/**
 * 获取公钥，用于加密对称密钥
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function getPublicKey(request: GetPublicKeyRequest) throws: GetPublicKeyModel  {
  var runtime = new RuntimeOptions{};
  return getPublicKeyEx(request, runtime);
}

/**
 * 获取公钥，用于加密对称密钥
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getPublicKeyEx(request: GetPublicKeyRequest, runtime: RuntimeOptions): GetPublicKeyModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/get_public_key`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model LinkModel {
  headers?: map[string]string(name='headers'),
  body: AccountAccessTokenResponse(name='body'),
}

/**
 * 绑定用户认证方式
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 */
async function link(request: AccountLinkRequest) throws: LinkModel  {
  var runtime = new RuntimeOptions{};
  return linkEx(request, runtime);
}

/**
 * 绑定用户认证方式
 * @tags account
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 */
api linkEx(request: AccountLinkRequest, runtime: RuntimeOptions): LinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/link`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CheckExistModel {
  headers?: map[string]string(name='headers'),
  body: MobileCheckExistResponse(name='body'),
}

/**
 * 查询手机号是否已被注册
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function checkExist(request: MobileCheckExistRequest) throws: CheckExistModel  {
  var runtime = new RuntimeOptions{};
  return checkExistEx(request, runtime);
}

/**
 * 查询手机号是否已被注册
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api checkExistEx(request: MobileCheckExistRequest, runtime: RuntimeOptions): CheckExistModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/check_exist`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model LoginModel {
  headers?: map[string]string(name='headers'),
  body: AccountAccessTokenResponse(name='body'),
}

/**
 * 通过手机号+短信或密码登录，返回刷新令牌和访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function login(request: MobileLoginRequest) throws: LoginModel  {
  var runtime = new RuntimeOptions{};
  return loginEx(request, runtime);
}

/**
 * 通过手机号+短信或密码登录，返回刷新令牌和访问令牌
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api loginEx(request: MobileLoginRequest, runtime: RuntimeOptions): LoginModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/login`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model RegisterModel {
  headers?: map[string]string(name='headers'),
  body: AccountAccessTokenResponse(name='body'),
}

/**
 * 通过手机号+短信验证码注册账号
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 */
async function register(request: MobileRegisterRequest) throws: RegisterModel  {
  var runtime = new RuntimeOptions{};
  return registerEx(request, runtime);
}

/**
 * 通过手机号+短信验证码注册账号
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 */
api registerEx(request: MobileRegisterRequest, runtime: RuntimeOptions): RegisterModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/register`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model MobileSendSmsCodeModel {
  headers?: map[string]string(name='headers'),
  body: MobileSendSmsCodeResponse(name='body'),
}

/**
 * 发送短信验证码，用于登录、注册、修改密码、绑定等
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function mobileSendSmsCode(request: MobileSendSmsCodeRequest) throws: MobileSendSmsCodeModel  {
  var runtime = new RuntimeOptions{};
  return mobileSendSmsCodeEx(request, runtime);
}

/**
 * 发送短信验证码，用于登录、注册、修改密码、绑定等
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api mobileSendSmsCodeEx(request: MobileSendSmsCodeRequest, runtime: RuntimeOptions): MobileSendSmsCodeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/mobile/send_sms_code`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model AccountRevokeModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 用户退出登录
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function accountRevoke(request: RevokeRequest) throws: AccountRevokeModel  {
  var runtime = new RuntimeOptions{};
  return accountRevokeEx(request, runtime);
}

/**
 * 用户退出登录
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api accountRevokeEx(request: RevokeRequest, runtime: RuntimeOptions): AccountRevokeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/revoke`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model AccountTokenModel {
  headers?: map[string]string(name='headers'),
  body: AccountAccessTokenResponse(name='body'),
}

/**
 * 用户通过刷新令牌（refresh_token）获取访问令牌（access_token）
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function accountToken(request: AccountTokenRequest) throws: AccountTokenModel  {
  var runtime = new RuntimeOptions{};
  return accountTokenEx(request, runtime);
}

/**
 * 用户通过刷新令牌（refresh_token）获取访问令牌（access_token）
 * @tags account
 * @error InvalidParameterMissing The input parameter {parameter_name} is missing.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 */
api accountTokenEx(request: AccountTokenRequest, runtime: RuntimeOptions): AccountTokenModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/account/token`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.auth.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ExportAuditLogModel {
  headers?: map[string]string(name='headers'),
  body: ExportAuditLogResponse(name='body'),
}

/**
 * export audit log
 * @tags audit_log
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function exportAuditLog(request: ExportAuditLogRequest) throws: ExportAuditLogModel  {
  var runtime = new RuntimeOptions{};
  return exportAuditLogEx(request, runtime);
}

/**
 * export audit log
 * @tags audit_log
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api exportAuditLogEx(request: ExportAuditLogRequest, runtime: RuntimeOptions): ExportAuditLogModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/audit_log/export`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchAuditLogModel {
  headers?: map[string]string(name='headers'),
  body: SearchAuditLogResponse(name='body'),
}

/**
 * search audit log
 * @tags audit_log
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function searchAuditLog(request: SearchAuditLogRequest) throws: SearchAuditLogModel  {
  var runtime = new RuntimeOptions{};
  return searchAuditLogEx(request, runtime);
}

/**
 * search audit log
 * @tags audit_log
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api searchAuditLogEx(request: SearchAuditLogRequest, runtime: RuntimeOptions): SearchAuditLogModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/audit_log/search`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model AdminListStoresModel {
  headers?: map[string]string(name='headers'),
  body: ListStoresResponse(name='body'),
}

/**
 * 列举Store列表
 * @tags admin
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function adminListStores(request: AdminListStoresRequest) throws: AdminListStoresModel  {
  var runtime = new RuntimeOptions{};
  return adminListStoresEx(request, runtime);
}

/**
 * 列举Store列表
 * @tags admin
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api adminListStoresEx(request: AdminListStoresRequest, runtime: RuntimeOptions): AdminListStoresModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/domain/list_stores`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateSubdomainModel {
  headers?: map[string]string(name='headers'),
  body: CreateSubdomainResponse(name='body'),
}

/**
 * create subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function createSubdomain(request: CreateSubdomainRequest) throws: CreateSubdomainModel  {
  var runtime = new RuntimeOptions{};
  return createSubdomainEx(request, runtime);
}

/**
 * create subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api createSubdomainEx(request: CreateSubdomainRequest, runtime: RuntimeOptions): CreateSubdomainModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/subdomain/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteSubdomainModel {
  headers?: map[string]string(name='headers'),
  body: DeleteSubdomainResponse(name='body'),
}

/**
 * delete subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function deleteSubdomain(request: DeleteSubdomainRequest) throws: DeleteSubdomainModel  {
  var runtime = new RuntimeOptions{};
  return deleteSubdomainEx(request, runtime);
}

/**
 * delete subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api deleteSubdomainEx(request: DeleteSubdomainRequest, runtime: RuntimeOptions): DeleteSubdomainModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/subdomain/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetSubdomainModel {
  headers?: map[string]string(name='headers'),
  body: GetSubdomainResponse(name='body'),
}

/**
 * get subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function getSubdomain(request: GetSubdomainRequest) throws: GetSubdomainModel  {
  var runtime = new RuntimeOptions{};
  return getSubdomainEx(request, runtime);
}

/**
 * get subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api getSubdomainEx(request: GetSubdomainRequest, runtime: RuntimeOptions): GetSubdomainModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/subdomain/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListSubdomainsModel {
  headers?: map[string]string(name='headers'),
  body: ListSubdomainsResponse(name='body'),
}

/**
 * list subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function listSubdomains(request: ListSubdomainsRequest) throws: ListSubdomainsModel  {
  var runtime = new RuntimeOptions{};
  return listSubdomainsEx(request, runtime);
}

/**
 * list subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api listSubdomainsEx(request: ListSubdomainsRequest, runtime: RuntimeOptions): ListSubdomainsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/subdomain/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateSubdomainModel {
  headers?: map[string]string(name='headers'),
  body: UpdateSubdomainResponse(name='body'),
}

/**
 * update subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
async function updateSubdomain(request: UpdateSubdomainRequest) throws: UpdateSubdomainModel  {
  var runtime = new RuntimeOptions{};
  return updateSubdomainEx(request, runtime);
}

/**
 * update subdomain
 * @tags subdomain
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error InternalError The request has been failed due to some unknown error.
 */
api updateSubdomainEx(request: UpdateSubdomainRequest, runtime: RuntimeOptions): UpdateSubdomainModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/subdomain/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetUserAccessTokenModel {
  headers?: map[string]string(name='headers'),
  body: GetUserAccessTokenResponse(name='body'),
}

/**
 * 获取用户的accessToken
 * @tags admin
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 */
async function getUserAccessToken(request: GetUserAccessTokenRequest) throws: GetUserAccessTokenModel  {
  var runtime = new RuntimeOptions{};
  return getUserAccessTokenEx(request, runtime);
}

/**
 * 获取用户的accessToken
 * @tags admin
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 * @error undefined undefined
 */
api getUserAccessTokenEx(request: GetUserAccessTokenRequest, runtime: RuntimeOptions): GetUserAccessTokenModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/get_access_token`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetAsyncTaskInfoModel {
  headers?: map[string]string(name='headers'),
  body: GetAsyncTaskResponse(name='body'),
}

/**
 * 如果目录拷贝、目录删除不能在限定时间内完成，将访问一个异步任务id，
 * 通过此接口获取异步任务的信息，以确定任务是否执行成功。
 * @tags async_task
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getAsyncTaskInfo(request: GetAsyncTaskRequest) throws: GetAsyncTaskInfoModel  {
  var runtime = new RuntimeOptions{};
  return getAsyncTaskInfoEx(request, runtime);
}

/**
 * 如果目录拷贝、目录删除不能在限定时间内完成，将访问一个异步任务id，
 * 通过此接口获取异步任务的信息，以确定任务是否执行成功。
 * @tags async_task
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getAsyncTaskInfoEx(request: GetAsyncTaskRequest, runtime: RuntimeOptions): GetAsyncTaskInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/async_task/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model BatchOperationModel {
  headers?: map[string]string(name='headers'),
  body: BatchResponse(name='body'),
}

/**
 * 对多个原子操作封装成一个批处理请求，服务端并行处理并打包返回每个操作的执行结果。
 * 支持对文件和文件夹的移动、删除、修改，每个批处理请求最多包含100个原则操作。
 * @tags batch
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function batchOperation(request: BatchRequest) throws: BatchOperationModel  {
  var runtime = new RuntimeOptions{};
  return batchOperationEx(request, runtime);
}

/**
 * 对多个原子操作封装成一个批处理请求，服务端并行处理并打包返回每个操作的执行结果。
 * 支持对文件和文件夹的移动、删除、修改，每个批处理请求最多包含100个原则操作。
 * @tags batch
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api batchOperationEx(request: BatchRequest, runtime: RuntimeOptions): BatchOperationModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/batch`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateDriveModel {
  headers?: map[string]string(name='headers'),
  body: CreateDriveResponse(name='body'),
}

/**
 * 支持normal和large两种drive，
 * large类型的drive用于文件数多的场景，不支持list操作，
 * 当drive的文件数量大于1亿时，建议使用large类型。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createDrive(request: CreateDriveRequest) throws: CreateDriveModel  {
  var runtime = new RuntimeOptions{};
  return createDriveEx(request, runtime);
}

/**
 * 支持normal和large两种drive，
 * large类型的drive用于文件数多的场景，不支持list操作，
 * 当drive的文件数量大于1亿时，建议使用large类型。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createDriveEx(request: CreateDriveRequest, runtime: RuntimeOptions): CreateDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteDriveModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 删除指定drive_id对应的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteDrive(request: DeleteDriveRequest) throws: DeleteDriveModel  {
  var runtime = new RuntimeOptions{};
  return deleteDriveEx(request, runtime);
}

/**
 * 删除指定drive_id对应的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteDriveEx(request: DeleteDriveRequest, runtime: RuntimeOptions): DeleteDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDriveModel {
  headers?: map[string]string(name='headers'),
  body: GetDriveResponse(name='body'),
}

/**
 * 获取指定drive_id对应的Drive详细信息。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getDrive(request: GetDriveRequest) throws: GetDriveModel  {
  var runtime = new RuntimeOptions{};
  return getDriveEx(request, runtime);
}

/**
 * 获取指定drive_id对应的Drive详细信息。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDriveEx(request: GetDriveRequest, runtime: RuntimeOptions): GetDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDefaultDriveModel {
  headers?: map[string]string(name='headers'),
  body: GetDriveResponse(name='body'),
}

/**
 * 一个用户可拥有多个drive，在创建drive时通过参数指定是否为这个用户的默认drive，
 * 每个用户只能设置一个默认drive。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getDefaultDrive(request: GetDefaultDriveRequest) throws: GetDefaultDriveModel  {
  var runtime = new RuntimeOptions{};
  return getDefaultDriveEx(request, runtime);
}

/**
 * 一个用户可拥有多个drive，在创建drive时通过参数指定是否为这个用户的默认drive，
 * 每个用户只能设置一个默认drive。
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDefaultDriveEx(request: GetDefaultDriveRequest, runtime: RuntimeOptions): GetDefaultDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/get_default_drive`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListDrivesModel {
  headers?: map[string]string(name='headers'),
  body: ListDriveResponse(name='body'),
}

/**
 * 管理员列举指定用户的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listDrives(request: ListDriveRequest) throws: ListDrivesModel  {
  var runtime = new RuntimeOptions{};
  return listDrivesEx(request, runtime);
}

/**
 * 管理员列举指定用户的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listDrivesEx(request: ListDriveRequest, runtime: RuntimeOptions): ListDrivesModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListMyDrivesModel {
  headers?: map[string]string(name='headers'),
  body: ListDriveResponse(name='body'),
}

/**
 * 列举当前用户（访问令牌）的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listMyDrives(request: ListMyDriveRequest) throws: ListMyDrivesModel  {
  var runtime = new RuntimeOptions{};
  return listMyDrivesEx(request, runtime);
}

/**
 * 列举当前用户（访问令牌）的Drive
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listMyDrivesEx(request: ListMyDriveRequest, runtime: RuntimeOptions): ListMyDrivesModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/list_my_drives`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateDriveModel {
  headers?: map[string]string(name='headers'),
  body: UpdateDriveResponse(name='body'),
}

/**
 * 更新指定drive_id的Drive信息
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateDrive(request: UpdateDriveRequest) throws: UpdateDriveModel  {
  var runtime = new RuntimeOptions{};
  return updateDriveEx(request, runtime);
}

/**
 * 更新指定drive_id的Drive信息
 * @tags drive
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateDriveEx(request: UpdateDriveRequest, runtime: RuntimeOptions): UpdateDriveModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/drive/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ArchiveFilesModel {
  headers?: map[string]string(name='headers'),
  body: CCPArchiveFilesResponse(name='body'),
}

/**
 * archive_files
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function archiveFiles(request: CCPArchiveFilesRequest) throws: ArchiveFilesModel  {
  var runtime = new RuntimeOptions{};
  return archiveFilesEx(request, runtime);
}

/**
 * archive_files
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api archiveFilesEx(request: CCPArchiveFilesRequest, runtime: RuntimeOptions): ArchiveFilesModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/archive_files`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CompleteFileModel {
  headers?: map[string]string(name='headers'),
  body: CompleteFileResponse(name='body'),
}

/**
 * 完成文件上传。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function completeFile(request: CompleteFileRequest) throws: CompleteFileModel  {
  var runtime = new RuntimeOptions{};
  return completeFileEx(request, runtime);
}

/**
 * 完成文件上传。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api completeFileEx(request: CompleteFileRequest, runtime: RuntimeOptions): CompleteFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/complete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CopyFileModel {
  headers?: map[string]string(name='headers'),
  body: CopyFileResponse(name='body'),
}

/**
 * 指定源文件或文件夹，拷贝到指定的文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function copyFile(request: CopyFileRequest) throws: CopyFileModel  {
  var runtime = new RuntimeOptions{};
  return copyFileEx(request, runtime);
}

/**
 * 指定源文件或文件夹，拷贝到指定的文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api copyFileEx(request: CopyFileRequest, runtime: RuntimeOptions): CopyFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/copy`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateFileModel {
  headers?: map[string]string(name='headers'),
  body: CreateFileResponse(name='body'),
}

/**
 * 在指定文件夹下创建文件或者文件夹，
 * 根文件夹用root表示，其他文件夹使用创建文件夹时返回的file_id。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createFile(request: CreateFileRequest) throws: CreateFileModel  {
  var runtime = new RuntimeOptions{};
  return createFileEx(request, runtime);
}

/**
 * 在指定文件夹下创建文件或者文件夹，
 * 根文件夹用root表示，其他文件夹使用创建文件夹时返回的file_id。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createFileEx(request: CreateFileRequest, runtime: RuntimeOptions): CreateFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateFileWithProofModel {
  headers?: map[string]string(name='headers'),
  body: CreateFileResponse(name='body'),
}

/**
 * 在指定文件夹下创建文件或者文件夹，
 * 根文件夹用root表示，其他文件夹使用创建文件夹时返回的file_id。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createFileWithProof(request: CreateFileRequest) throws: CreateFileWithProofModel  {
  var runtime = new RuntimeOptions{};
  return createFileWithProofEx(request, runtime);
}

/**
 * 在指定文件夹下创建文件或者文件夹，
 * 根文件夹用root表示，其他文件夹使用创建文件夹时返回的file_id。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createFileWithProofEx(request: CreateFileRequest, runtime: RuntimeOptions): CreateFileWithProofModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/create_with_proof`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteFileModel {
  headers?: map[string]string(name='headers'),
  body: DeleteFileResponse(name='body'),
}

/**
 * 指定文件或文件夹ID，删除文件或者文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteFile(request: DeleteFileRequest) throws: DeleteFileModel  {
  var runtime = new RuntimeOptions{};
  return deleteFileEx(request, runtime);
}

/**
 * 指定文件或文件夹ID，删除文件或者文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteFileEx(request: DeleteFileRequest, runtime: RuntimeOptions): DeleteFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteUsertagsModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 对指定的文件或文件夹删除 user tags。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error StateConflict User operation is not valid.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteUsertags(request: DeleteFileUserTagsRequest) throws: DeleteUsertagsModel  {
  var runtime = new RuntimeOptions{};
  return deleteUsertagsEx(request, runtime);
}

/**
 * 对指定的文件或文件夹删除 user tags。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error StateConflict User operation is not valid.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteUsertagsEx(request: DeleteFileUserTagsRequest, runtime: RuntimeOptions): DeleteUsertagsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/delete_usertags`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetFileModel {
  headers?: map[string]string(name='headers'),
  body: GetFileResponse(name='body'),
}

/**
 * 获取指定文件或文件夹ID的信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getFile(request: GetFileRequest) throws: GetFileModel  {
  var runtime = new RuntimeOptions{};
  return getFileEx(request, runtime);
}

/**
 * 获取指定文件或文件夹ID的信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getFileEx(request: GetFileRequest, runtime: RuntimeOptions): GetFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetFileByPathModel {
  headers?: map[string]string(name='headers'),
  body: GetFileByPathResponse(name='body'),
}

/**
 * 根据路径获取指定文件或文件夹的信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getFileByPath(request: GetFileByPathRequest) throws: GetFileByPathModel  {
  var runtime = new RuntimeOptions{};
  return getFileByPathEx(request, runtime);
}

/**
 * 根据路径获取指定文件或文件夹的信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getFileByPathEx(request: GetFileByPathRequest, runtime: RuntimeOptions): GetFileByPathModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_by_path`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDownloadUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetDownloadUrlResponse(name='body'),
}

/**
 * 获取文件的下载地址，调用者可自己设置range头并发下载。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getDownloadUrl(request: GetDownloadUrlRequest) throws: GetDownloadUrlModel  {
  var runtime = new RuntimeOptions{};
  return getDownloadUrlEx(request, runtime);
}

/**
 * 获取文件的下载地址，调用者可自己设置range头并发下载。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDownloadUrlEx(request: GetDownloadUrlRequest, runtime: RuntimeOptions): GetDownloadUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_download_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetLastCursorModel {
  headers?: map[string]string(name='headers'),
  body: GetLastCursorResponse(name='body'),
}

/**
 * 获取drive内，增量数据最新的游标
 * @tags file_delta
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getLastCursor(request: GetLastCursorRequest) throws: GetLastCursorModel  {
  var runtime = new RuntimeOptions{};
  return getLastCursorEx(request, runtime);
}

/**
 * 获取drive内，增量数据最新的游标
 * @tags file_delta
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getLastCursorEx(request: GetLastCursorRequest, runtime: RuntimeOptions): GetLastCursorModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_last_cursor`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetMediaPlayUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetMediaPlayURLResponse(name='body'),
}

/**
 * 获取media文件播放URL地址（当前仅支持m3u8）
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getMediaPlayUrl(request: GetMediaPlayURLRequest) throws: GetMediaPlayUrlModel  {
  var runtime = new RuntimeOptions{};
  return getMediaPlayUrlEx(request, runtime);
}

/**
 * 获取media文件播放URL地址（当前仅支持m3u8）
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getMediaPlayUrlEx(request: GetMediaPlayURLRequest, runtime: RuntimeOptions): GetMediaPlayUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_media_play_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetOfficeEditUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetOfficeEditUrlResponse(name='body'),
}

/**
 * 获取文档的在线编辑地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getOfficeEditUrl(request: GetOfficeEditUrlRequest) throws: GetOfficeEditUrlModel  {
  var runtime = new RuntimeOptions{};
  return getOfficeEditUrlEx(request, runtime);
}

/**
 * 获取文档的在线编辑地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getOfficeEditUrlEx(request: GetOfficeEditUrlRequest, runtime: RuntimeOptions): GetOfficeEditUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_office_edit_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetOfficePreviewUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetOfficePreviewUrlResponse(name='body'),
}

/**
 * 获取文档的预览地址（office文档）
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getOfficePreviewUrl(request: GetOfficePreviewUrlRequest) throws: GetOfficePreviewUrlModel  {
  var runtime = new RuntimeOptions{};
  return getOfficePreviewUrlEx(request, runtime);
}

/**
 * 获取文档的预览地址（office文档）
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getOfficePreviewUrlEx(request: GetOfficePreviewUrlRequest, runtime: RuntimeOptions): GetOfficePreviewUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_office_preview_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetShareLinkDownloadUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetShareLinkDownloadURLResponse(name='body'),
}

/**
 * 获取分享中文件的下载地址，调用者可自己设置range头并发下载。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getShareLinkDownloadUrl(request: GetShareLinkDownloadURLRequest) throws: GetShareLinkDownloadUrlModel  {
  var runtime = new RuntimeOptions{};
  return getShareLinkDownloadUrlEx(request, runtime);
}

/**
 * 获取分享中文件的下载地址，调用者可自己设置range头并发下载。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getShareLinkDownloadUrlEx(request: GetShareLinkDownloadURLRequest, runtime: RuntimeOptions): GetShareLinkDownloadUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_share_link_download_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetShareLinkVideoPreviewPlayInfoModel {
  headers?: map[string]string(name='headers'),
  body: CCPGetShareLinkVideoPreviewPlayInfoResponse(name='body'),
}

/**
 * 获取分享中文件播放信息
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getShareLinkVideoPreviewPlayInfo(request: CCPGetShareLinkVideoPreviewPlayInfoRequest) throws: GetShareLinkVideoPreviewPlayInfoModel  {
  var runtime = new RuntimeOptions{};
  return getShareLinkVideoPreviewPlayInfoEx(request, runtime);
}

/**
 * 获取分享中文件播放信息
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getShareLinkVideoPreviewPlayInfoEx(request: CCPGetShareLinkVideoPreviewPlayInfoRequest, runtime: RuntimeOptions): GetShareLinkVideoPreviewPlayInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_share_link_video_preview_play_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetUploadUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetUploadUrlResponse(name='body'),
}

/**
 * 可指定分片信息，一次获取多个分片的上传地址。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getUploadUrl(request: GetUploadUrlRequest) throws: GetUploadUrlModel  {
  var runtime = new RuntimeOptions{};
  return getUploadUrlEx(request, runtime);
}

/**
 * 可指定分片信息，一次获取多个分片的上传地址。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getUploadUrlEx(request: GetUploadUrlRequest, runtime: RuntimeOptions): GetUploadUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_upload_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetVideoPreviewPlayInfoModel {
  headers?: map[string]string(name='headers'),
  body: CCPGetVideoPreviewPlayInfoResponse(name='body'),
}

/**
 * 获取视频文件播放信息
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getVideoPreviewPlayInfo(request: CCPGetVideoPreviewPlayInfoRequest) throws: GetVideoPreviewPlayInfoModel  {
  var runtime = new RuntimeOptions{};
  return getVideoPreviewPlayInfoEx(request, runtime);
}

/**
 * 获取视频文件播放信息
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getVideoPreviewPlayInfoEx(request: CCPGetVideoPreviewPlayInfoRequest, runtime: RuntimeOptions): GetVideoPreviewPlayInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_video_preview_play_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetVideoPreviewSpriteUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetVideoPreviewSpriteURLResponse(name='body'),
}

/**
 * 获取视频雪碧图地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getVideoPreviewSpriteUrl(request: GetVideoPreviewSpriteURLRequest) throws: GetVideoPreviewSpriteUrlModel  {
  var runtime = new RuntimeOptions{};
  return getVideoPreviewSpriteUrlEx(request, runtime);
}

/**
 * 获取视频雪碧图地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getVideoPreviewSpriteUrlEx(request: GetVideoPreviewSpriteURLRequest, runtime: RuntimeOptions): GetVideoPreviewSpriteUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_video_preview_sprite_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetVideoPreviewUrlModel {
  headers?: map[string]string(name='headers'),
  body: GetVideoPreviewURLResponse(name='body'),
}

/**
 * 获取视频播放地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getVideoPreviewUrl(request: GetVideoPreviewURLRequest) throws: GetVideoPreviewUrlModel  {
  var runtime = new RuntimeOptions{};
  return getVideoPreviewUrlEx(request, runtime);
}

/**
 * 获取视频播放地址
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getVideoPreviewUrlEx(request: GetVideoPreviewURLRequest, runtime: RuntimeOptions): GetVideoPreviewUrlModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/get_video_preview_url`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileModel {
  headers?: map[string]string(name='headers'),
  body: ListFileResponse(name='body'),
}

/**
 * 列举指定目录下的文件或文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listFile(request: ListFileRequest) throws: ListFileModel  {
  var runtime = new RuntimeOptions{};
  return listFileEx(request, runtime);
}

/**
 * 列举指定目录下的文件或文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFileEx(request: ListFileRequest, runtime: RuntimeOptions): ListFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileActivityModel {
  headers?: map[string]string(name='headers'),
  body: ListFileActivityResponse(name='body'),
}

/**
 * list file activity
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listFileActivity(request: ListFileActivityRequest) throws: ListFileActivityModel  {
  var runtime = new RuntimeOptions{};
  return listFileActivityEx(request, runtime);
}

/**
 * list file activity
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFileActivityEx(request: ListFileActivityRequest, runtime: RuntimeOptions): ListFileActivityModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_activity`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileByAnonymousModel {
  headers?: map[string]string(name='headers'),
  body: ListByAnonymousResponse(name='body'),
}

/**
 * 查看分享中的文件列表
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ShareLinkTokenInvalid ShareToken is invalid. {message}
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listFileByAnonymous(request: ListByAnonymousRequest) throws: ListFileByAnonymousModel  {
  var runtime = new RuntimeOptions{};
  return listFileByAnonymousEx(request, runtime);
}

/**
 * 查看分享中的文件列表
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ShareLinkTokenInvalid ShareToken is invalid. {message}
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFileByAnonymousEx(request: ListByAnonymousRequest, runtime: RuntimeOptions): ListFileByAnonymousModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_by_anonymous`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileByCustomIndexKeyModel {
  headers?: map[string]string(name='headers'),
  body: ListFileResponse(name='body'),
}

/**
 * 根据自定义同步索引键列举文件或文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listFileByCustomIndexKey(request: ListFileByCustomIndexKeyRequest) throws: ListFileByCustomIndexKeyModel  {
  var runtime = new RuntimeOptions{};
  return listFileByCustomIndexKeyEx(request, runtime);
}

/**
 * 根据自定义同步索引键列举文件或文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFileByCustomIndexKeyEx(request: ListFileByCustomIndexKeyRequest, runtime: RuntimeOptions): ListFileByCustomIndexKeyModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_by_custom_index_key`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileDeltaModel {
  headers?: map[string]string(name='headers'),
  body: ListFileDeltaResponse(name='body'),
}

/**
 * 获取drive内，增量数据列表
 * @tags file_delta
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listFileDelta(request: ListFileDeltaRequest) throws: ListFileDeltaModel  {
  var runtime = new RuntimeOptions{};
  return listFileDeltaEx(request, runtime);
}

/**
 * 获取drive内，增量数据列表
 * @tags file_delta
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFileDeltaEx(request: ListFileDeltaRequest, runtime: RuntimeOptions): ListFileDeltaModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_delta`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListUploadedPartsModel {
  headers?: map[string]string(name='headers'),
  body: ListUploadedPartResponse(name='body'),
}

/**
 * 列举upload_id对应的已上传分片。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listUploadedParts(request: ListUploadedPartRequest) throws: ListUploadedPartsModel  {
  var runtime = new RuntimeOptions{};
  return listUploadedPartsEx(request, runtime);
}

/**
 * 列举upload_id对应的已上传分片。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listUploadedPartsEx(request: ListUploadedPartRequest, runtime: RuntimeOptions): ListUploadedPartsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/list_uploaded_parts`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model LiveTranscodeModel {
  headers?: map[string]string(name='headers'),
  body: CCPLiveTranscodeResponse(name='body'),
}

/**
 * live_transcode
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function liveTranscode(request: CCPLiveTranscodeRequest) throws: LiveTranscodeModel  {
  var runtime = new RuntimeOptions{};
  return liveTranscodeEx(request, runtime);
}

/**
 * live_transcode
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api liveTranscodeEx(request: CCPLiveTranscodeRequest, runtime: RuntimeOptions): LiveTranscodeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/live_transcode`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model MoveFileModel {
  headers?: map[string]string(name='headers'),
  body: MoveFileResponse(name='body'),
}

/**
 * 指定源文件或文件夹，移动到指定的文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function moveFile(request: MoveFileRequest) throws: MoveFileModel  {
  var runtime = new RuntimeOptions{};
  return moveFileEx(request, runtime);
}

/**
 * 指定源文件或文件夹，移动到指定的文件夹。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api moveFileEx(request: MoveFileRequest, runtime: RuntimeOptions): MoveFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/move`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model PutUsertagsModel {
  headers?: map[string]string(name='headers'),
  body: PutFileUserTagsResponse(name='body'),
}

/**
 * 对指定的文件或文件夹更新 user tags。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error StateConflict User operation is not valid.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function putUsertags(request: PutFileUserTagsRequest) throws: PutUsertagsModel  {
  var runtime = new RuntimeOptions{};
  return putUsertagsEx(request, runtime);
}

/**
 * 对指定的文件或文件夹更新 user tags。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error StateConflict User operation is not valid.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api putUsertagsEx(request: PutFileUserTagsRequest, runtime: RuntimeOptions): PutUsertagsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/put_usertags`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model TokenModel {
  headers?: map[string]string(name='headers'),
  body: RefreshOfficeEditTokenResponse(name='body'),
}

/**
 * 刷新在线编辑Token
 * @tags file, refresh, office, edit
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function token(request: RefreshOfficeEditTokenRequest) throws: TokenModel  {
  var runtime = new RuntimeOptions{};
  return tokenEx(request, runtime);
}

/**
 * 刷新在线编辑Token
 * @tags file, refresh, office, edit
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api tokenEx(request: RefreshOfficeEditTokenRequest, runtime: RuntimeOptions): TokenModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/refresh_office_edit_token`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ScanFileMetaModel {
  headers?: map[string]string(name='headers'),
  body: ScanFileMetaResponse(name='body'),
}

/**
 * 在指定drive下全量获取文件元信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function scanFileMeta(request: ScanFileMetaRequest) throws: ScanFileMetaModel  {
  var runtime = new RuntimeOptions{};
  return scanFileMetaEx(request, runtime);
}

/**
 * 在指定drive下全量获取文件元信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api scanFileMetaEx(request: ScanFileMetaRequest, runtime: RuntimeOptions): ScanFileMetaModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/scan`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchFileModel {
  headers?: map[string]string(name='headers'),
  body: SearchFileResponse(name='body'),
}

/**
 * 根据筛选条件，在指定drive下搜索文件。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function searchFile(request: SearchFileRequest) throws: SearchFileModel  {
  var runtime = new RuntimeOptions{};
  return searchFileEx(request, runtime);
}

/**
 * 根据筛选条件，在指定drive下搜索文件。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api searchFileEx(request: SearchFileRequest, runtime: RuntimeOptions): SearchFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/search`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateFileModel {
  headers?: map[string]string(name='headers'),
  body: UpdateFileMetaResponse(name='body'),
}

/**
 * 对指定的文件或文件夹更新信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateFile(request: UpdateFileMetaRequest) throws: UpdateFileModel  {
  var runtime = new RuntimeOptions{};
  return updateFileEx(request, runtime);
}

/**
 * 对指定的文件或文件夹更新信息。
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error AlreadyExist {resource} has already exists. {extra_msg}
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateFileEx(request: UpdateFileMetaRequest, runtime: RuntimeOptions): UpdateFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model WalkFileModel {
  headers?: map[string]string(name='headers'),
  body: CCPWalkFileResponse(name='body'),
}

/**
 * walk file
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function walkFile(request: CCPWalkFileRequest) throws: WalkFileModel  {
  var runtime = new RuntimeOptions{};
  return walkFileEx(request, runtime);
}

/**
 * walk file
 * @tags file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api walkFileEx(request: CCPWalkFileRequest, runtime: RuntimeOptions): WalkFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/file/walk`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ClearRecyclebinModel {
  headers?: map[string]string(name='headers'),
  body: ClearRecycleBinResponse(name='body'),
}

/**
 * clear_recyclebin
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function clearRecyclebin(request: ClearRecycleBinRequest) throws: ClearRecyclebinModel  {
  var runtime = new RuntimeOptions{};
  return clearRecyclebinEx(request, runtime);
}

/**
 * clear_recyclebin
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api clearRecyclebinEx(request: ClearRecycleBinRequest, runtime: RuntimeOptions): ClearRecyclebinModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/recyclebin/clear`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListRecyclebinModel {
  headers?: map[string]string(name='headers'),
  body: ListFileResponse(name='body'),
}

/**
 * list_recyclebin
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listRecyclebin(request: ListFileInRecycleBinRequest) throws: ListRecyclebinModel  {
  var runtime = new RuntimeOptions{};
  return listRecyclebinEx(request, runtime);
}

/**
 * list_recyclebin
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listRecyclebinEx(request: ListFileInRecycleBinRequest, runtime: RuntimeOptions): ListRecyclebinModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/recyclebin/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model RestoreFileModel {
  headers?: map[string]string(name='headers'),
  body: RestoreFileResponse(name='body'),
}

/**
 * restore_file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function restoreFile(request: RestoreFileRequest) throws: RestoreFileModel  {
  var runtime = new RuntimeOptions{};
  return restoreFileEx(request, runtime);
}

/**
 * restore_file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api restoreFileEx(request: RestoreFileRequest, runtime: RuntimeOptions): RestoreFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/recyclebin/restore`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model TrashFileModel {
  headers?: map[string]string(name='headers'),
  body: TrashFileResponse(name='body'),
}

/**
 * trash_file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function trashFile(request: TrashFileRequest) throws: TrashFileModel  {
  var runtime = new RuntimeOptions{};
  return trashFileEx(request, runtime);
}

/**
 * trash_file
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api trashFileEx(request: TrashFileRequest, runtime: RuntimeOptions): TrashFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/recyclebin/trash`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 202)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ReportEventModel {
  headers?: map[string]string(name='headers'),
  body: ReportEventResponse(name='body'),
}

/**
 * 上报事件
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function reportEvent(request: ReportEventRequest) throws: ReportEventModel  {
  var runtime = new RuntimeOptions{};
  return reportEventEx(request, runtime);
}

/**
 * 上报事件
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api reportEventEx(request: ReportEventRequest, runtime: RuntimeOptions): ReportEventModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/report_event`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateShareModel {
  headers?: map[string]string(name='headers'),
  body: CreateShareResponse(name='body'),
}

/**
 * 创建共享。
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createShare(request: CreateShareRequest) throws: CreateShareModel  {
  var runtime = new RuntimeOptions{};
  return createShareEx(request, runtime);
}

/**
 * 创建共享。
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createShareEx(request: CreateShareRequest, runtime: RuntimeOptions): CreateShareModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteShareModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 删除指定共享
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteShare(request: DeleteShareRequest) throws: DeleteShareModel  {
  var runtime = new RuntimeOptions{};
  return deleteShareEx(request, runtime);
}

/**
 * 删除指定共享
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteShareEx(request: DeleteShareRequest, runtime: RuntimeOptions): DeleteShareModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetShareModel {
  headers?: map[string]string(name='headers'),
  body: GetShareResponse(name='body'),
}

/**
 * 获取共享信息。
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getShare(request: GetShareRequest) throws: GetShareModel  {
  var runtime = new RuntimeOptions{};
  return getShareEx(request, runtime);
}

/**
 * 获取共享信息。
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getShareEx(request: GetShareRequest, runtime: RuntimeOptions): GetShareModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListShareModel {
  headers?: map[string]string(name='headers'),
  body: ListShareResponse(name='body'),
}

/**
 * 列举指定用户的共享
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listShare(request: ListShareRequest) throws: ListShareModel  {
  var runtime = new RuntimeOptions{};
  return listShareEx(request, runtime);
}

/**
 * 列举指定用户的共享
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listShareEx(request: ListShareRequest, runtime: RuntimeOptions): ListShareModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateShareModel {
  headers?: map[string]string(name='headers'),
  body: UpdateShareResponse(name='body'),
}

/**
 * 修改指定共享
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateShare(request: UpdateShareRequest) throws: UpdateShareModel  {
  var runtime = new RuntimeOptions{};
  return updateShareEx(request, runtime);
}

/**
 * 修改指定共享
 * @tags share
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateShareEx(request: UpdateShareRequest, runtime: RuntimeOptions): UpdateShareModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CancelShareLinkModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 取消指定分享
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function cancelShareLink(request: CancelShareLinkRequest) throws: CancelShareLinkModel  {
  var runtime = new RuntimeOptions{};
  return cancelShareLinkEx(request, runtime);
}

/**
 * 取消指定分享
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api cancelShareLinkEx(request: CancelShareLinkRequest, runtime: RuntimeOptions): CancelShareLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/cancel`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateShareLinkModel {
  headers?: map[string]string(name='headers'),
  body: CreateShareLinkResponse(name='body'),
}

/**
 * 创建分享。
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createShareLink(request: CreateShareLinkRequest) throws: CreateShareLinkModel  {
  var runtime = new RuntimeOptions{};
  return createShareLinkEx(request, runtime);
}

/**
 * 创建分享。
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createShareLinkEx(request: CreateShareLinkRequest, runtime: RuntimeOptions): CreateShareLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetShareLinkModel {
  headers?: map[string]string(name='headers'),
  body: BaseShareLinkResponse(name='body'),
}

/**
 * 查看分享的所有信息
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getShareLink(request: GetShareLinkRequest) throws: GetShareLinkModel  {
  var runtime = new RuntimeOptions{};
  return getShareLinkEx(request, runtime);
}

/**
 * 查看分享的所有信息
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getShareLinkEx(request: GetShareLinkRequest, runtime: RuntimeOptions): GetShareLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetShareByAnonymousModel {
  headers?: map[string]string(name='headers'),
  body: GetShareLinkByAnonymousResponse(name='body'),
}

/**
 * 查看分享的基本信息，比如分享者、到期时间等
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getShareByAnonymous(request: GetShareLinkByAnonymousRequest) throws: GetShareByAnonymousModel  {
  var runtime = new RuntimeOptions{};
  return getShareByAnonymousEx(request, runtime);
}

/**
 * 查看分享的基本信息，比如分享者、到期时间等
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getShareByAnonymousEx(request: GetShareLinkByAnonymousRequest, runtime: RuntimeOptions): GetShareByAnonymousModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/get_by_anonymous`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetShareIdModel {
  headers?: map[string]string(name='headers'),
  body: GetShareLinkIDResponse(name='body'),
}

/**
 * 使用分享口令换取分享id
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getShareId(request: GetShareLinkIDRequest) throws: GetShareIdModel  {
  var runtime = new RuntimeOptions{};
  return getShareIdEx(request, runtime);
}

/**
 * 使用分享口令换取分享id
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getShareIdEx(request: GetShareLinkIDRequest, runtime: RuntimeOptions): GetShareIdModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/get_share_id`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetShareTokenModel {
  headers?: map[string]string(name='headers'),
  body: GetShareLinkTokenResponse(name='body'),
}

/**
 * 使用分享码+提取码换取分享token
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getShareToken(request: GetShareLinkTokenRequest) throws: GetShareTokenModel  {
  var runtime = new RuntimeOptions{};
  return getShareTokenEx(request, runtime);
}

/**
 * 使用分享码+提取码换取分享token
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getShareTokenEx(request: GetShareLinkTokenRequest, runtime: RuntimeOptions): GetShareTokenModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/get_share_token`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListShareLinkModel {
  headers?: map[string]string(name='headers'),
  body: ListShareLinkResponse(name='body'),
}

/**
 * 列举指定用户的分享
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listShareLink(request: ListShareLinkRequest) throws: ListShareLinkModel  {
  var runtime = new RuntimeOptions{};
  return listShareLinkEx(request, runtime);
}

/**
 * 列举指定用户的分享
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listShareLinkEx(request: ListShareLinkRequest, runtime: RuntimeOptions): ListShareLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateShareLinkModel {
  headers?: map[string]string(name='headers'),
  body: UpdateShareLinkResponse(name='body'),
}

/**
 * 更新分享。
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateShareLink(request: UpdateShareLinkRequest) throws: UpdateShareLinkModel  {
  var runtime = new RuntimeOptions{};
  return updateShareLinkEx(request, runtime);
}

/**
 * 更新分享。
 * @tags share_link
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateShareLinkEx(request: UpdateShareLinkRequest, runtime: RuntimeOptions): UpdateShareLinkModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/share_link/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDriveUsedSizeModel {
  headers?: map[string]string(name='headers'),
  body: GetDriveUsedSizeResponse(name='body'),
}

/**
 * 查询 Drive 使用空间
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getDriveUsedSize(request: GetDriveUsedSizeRequest) throws: GetDriveUsedSizeModel  {
  var runtime = new RuntimeOptions{};
  return getDriveUsedSizeEx(request, runtime);
}

/**
 * 查询 Drive 使用空间
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDriveUsedSizeEx(request: GetDriveUsedSizeRequest, runtime: RuntimeOptions): GetDriveUsedSizeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/statistics/drive_used_size`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `localhost`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetFileCountModel {
  headers?: map[string]string(name='headers'),
  body: GetFileCountResponse(name='body'),
}

/**
 * 查询 Domain 或 Drive 下文件数
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getFileCount(request: GetFileCountRequest) throws: GetFileCountModel  {
  var runtime = new RuntimeOptions{};
  return getFileCountEx(request, runtime);
}

/**
 * 查询 Domain 或 Drive 下文件数
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getFileCountEx(request: GetFileCountRequest, runtime: RuntimeOptions): GetFileCountModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/statistics/file_count`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `localhost`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetSubdomainSummaryModel {
  headers?: map[string]string(name='headers'),
  body: SubdomainSummaryResponse(name='body'),
}

/**
 * 查询 Domain 统计信息
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getSubdomainSummary(request: GetSubdomainSummaryRequest) throws: GetSubdomainSummaryModel  {
  var runtime = new RuntimeOptions{};
  return getSubdomainSummaryEx(request, runtime);
}

/**
 * 查询 Domain 统计信息
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getSubdomainSummaryEx(request: GetSubdomainSummaryRequest, runtime: RuntimeOptions): GetSubdomainSummaryModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/statistics/subdomain_summary`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `localhost`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetDomainSummaryModel {
  headers?: map[string]string(name='headers'),
  body: DomainSummaryResponse(name='body'),
}

/**
 * 查询 Domain 统计信息
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getDomainSummary(request: GetDomainSummaryRequest) throws: GetDomainSummaryModel  {
  var runtime = new RuntimeOptions{};
  return getDomainSummaryEx(request, runtime);
}

/**
 * 查询 Domain 统计信息
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getDomainSummaryEx(request: GetDomainSummaryRequest, runtime: RuntimeOptions): GetDomainSummaryModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/statistics/summary`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `localhost`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateGroupModel {
  headers?: map[string]string(name='headers'),
  body: CreateGroupResponse(name='body'),
}

/**
 * 创建用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createGroup(request: CreateGroupRequest) throws: CreateGroupModel  {
  var runtime = new RuntimeOptions{};
  return createGroupEx(request, runtime);
}

/**
 * 创建用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createGroupEx(request: CreateGroupRequest, runtime: RuntimeOptions): CreateGroupModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/group/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteGroupModel {
  headers?: map[string]string(name='headers'),
  body: DeleteGroupResponse(name='body'),
}

/**
 * 删除用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteGroup(request: DeleteGroupRequest) throws: DeleteGroupModel  {
  var runtime = new RuntimeOptions{};
  return deleteGroupEx(request, runtime);
}

/**
 * 删除用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteGroupEx(request: DeleteGroupRequest, runtime: RuntimeOptions): DeleteGroupModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/group/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetGroupModel {
  headers?: map[string]string(name='headers'),
  body: GetGroupResponse(name='body'),
}

/**
 * 获取用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getGroup(request: GetGroupRequest) throws: GetGroupModel  {
  var runtime = new RuntimeOptions{};
  return getGroupEx(request, runtime);
}

/**
 * 获取用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getGroupEx(request: GetGroupRequest, runtime: RuntimeOptions): GetGroupModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/group/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListGroupModel {
  headers?: map[string]string(name='headers'),
  body: ListGroupResponse(name='body'),
}

/**
 * 列举用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listGroup(request: ListGroupRequest) throws: ListGroupModel  {
  var runtime = new RuntimeOptions{};
  return listGroupEx(request, runtime);
}

/**
 * 列举用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listGroupEx(request: ListGroupRequest, runtime: RuntimeOptions): ListGroupModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/group/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchGroupModel {
  headers?: map[string]string(name='headers'),
  body: SearchGroupResponse(name='body'),
}

/**
 * 搜索用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function searchGroup(request: SearchGroupRequest) throws: SearchGroupModel  {
  var runtime = new RuntimeOptions{};
  return searchGroupEx(request, runtime);
}

/**
 * 搜索用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api searchGroupEx(request: SearchGroupRequest, runtime: RuntimeOptions): SearchGroupModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/group/search`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateGroupModel {
  headers?: map[string]string(name='headers'),
  body: UpdateGroupResponse(name='body'),
}

/**
 * 更新用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateGroup(request: UpdateGroupRequest) throws: UpdateGroupModel  {
  var runtime = new RuntimeOptions{};
  return updateGroupEx(request, runtime);
}

/**
 * 更新用户组
 * @tags group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateGroupEx(request: UpdateGroupRequest, runtime: RuntimeOptions): UpdateGroupModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/group/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateMembershipModel {
  headers?: map[string]string(name='headers'),
  body: CreateMembershipResponse(name='body'),
}

/**
 * 创建membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createMembership(request: CreateMembershipRequest) throws: CreateMembershipModel  {
  var runtime = new RuntimeOptions{};
  return createMembershipEx(request, runtime);
}

/**
 * 创建membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createMembershipEx(request: CreateMembershipRequest, runtime: RuntimeOptions): CreateMembershipModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteMembershipModel {
  headers?: map[string]string(name='headers'),
  body: DeleteMembershipResponse(name='body'),
}

/**
 * 删除membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteMembership(request: DeleteMembershipRequest) throws: DeleteMembershipModel  {
  var runtime = new RuntimeOptions{};
  return deleteMembershipEx(request, runtime);
}

/**
 * 删除membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteMembershipEx(request: DeleteMembershipRequest, runtime: RuntimeOptions): DeleteMembershipModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetMembershipModel {
  headers?: map[string]string(name='headers'),
  body: GetMembershipResponse(name='body'),
}

/**
 * 获取membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getMembership(request: GetMembershipRequest) throws: GetMembershipModel  {
  var runtime = new RuntimeOptions{};
  return getMembershipEx(request, runtime);
}

/**
 * 获取membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getMembershipEx(request: GetMembershipRequest, runtime: RuntimeOptions): GetMembershipModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model HasMemberModel {
  headers?: map[string]string(name='headers'),
  body: HasMembershipResponse(name='body'),
}

/**
 * 检查group是否包含某个member
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function hasMember(request: HasMemberRequest) throws: HasMemberModel  {
  var runtime = new RuntimeOptions{};
  return hasMemberEx(request, runtime);
}

/**
 * 检查group是否包含某个member
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api hasMemberEx(request: HasMemberRequest, runtime: RuntimeOptions): HasMemberModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/has_member`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListDirectChildMembershipsModel {
  headers?: map[string]string(name='headers'),
  body: ListDirectChildMembershipsResponse(name='body'),
}

/**
 * 列举直属的子membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listDirectChildMemberships(request: ListDirectChildMembershipsRequest) throws: ListDirectChildMembershipsModel  {
  var runtime = new RuntimeOptions{};
  return listDirectChildMembershipsEx(request, runtime);
}

/**
 * 列举直属的子membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listDirectChildMembershipsEx(request: ListDirectChildMembershipsRequest, runtime: RuntimeOptions): ListDirectChildMembershipsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/list_direct_child_memberships`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListDirectMembershipsModel {
  headers?: map[string]string(name='headers'),
  body: ListDirectParentMembershipsResponse(name='body'),
}

/**
 * 列举直属的membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listDirectMemberships(request: ListDirectParentMembershipsRequest) throws: ListDirectMembershipsModel  {
  var runtime = new RuntimeOptions{};
  return listDirectMembershipsEx(request, runtime);
}

/**
 * 列举直属的membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listDirectMembershipsEx(request: ListDirectParentMembershipsRequest, runtime: RuntimeOptions): ListDirectMembershipsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/list_direct_memberships`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListDirectParentMembershipsModel {
  headers?: map[string]string(name='headers'),
  body: ListDirectParentMembershipsResponse(name='body'),
}

/**
 * 列举直属的父membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listDirectParentMemberships(request: ListDirectParentMembershipsRequest) throws: ListDirectParentMembershipsModel  {
  var runtime = new RuntimeOptions{};
  return listDirectParentMembershipsEx(request, runtime);
}

/**
 * 列举直属的父membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listDirectParentMembershipsEx(request: ListDirectParentMembershipsRequest, runtime: RuntimeOptions): ListDirectParentMembershipsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/list_direct_parent_memberships`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateMembershipModel {
  headers?: map[string]string(name='headers'),
  body: UpdateMembershipResponse(name='body'),
}

/**
 * 更新membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateMembership(request: UpdateMembershipRequest) throws: UpdateMembershipModel  {
  var runtime = new RuntimeOptions{};
  return updateMembershipEx(request, runtime);
}

/**
 * 更新membership
 * @tags membership
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateMembershipEx(request: UpdateMembershipRequest, runtime: RuntimeOptions): UpdateMembershipModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/membership/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model AddUserToSubdomainModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function addUserToSubdomain(request: AddUserToSubdomainRequest) throws: AddUserToSubdomainModel  {
  var runtime = new RuntimeOptions{};
  return addUserToSubdomainEx(request, runtime);
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api addUserToSubdomainEx(request: AddUserToSubdomainRequest, runtime: RuntimeOptions): AddUserToSubdomainModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/add_user_to_subdomain`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateUserModel {
  headers?: map[string]string(name='headers'),
  body: CreateUserResponse(name='body'),
}

/**
 * 创建用户，只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createUser(request: CreateUserRequest) throws: CreateUserModel  {
  var runtime = new RuntimeOptions{};
  return createUserEx(request, runtime);
}

/**
 * 创建用户，只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createUserEx(request: CreateUserRequest, runtime: RuntimeOptions): CreateUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 201)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteUserModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteUser(request: DeleteUserRequest) throws: DeleteUserModel  {
  var runtime = new RuntimeOptions{};
  return deleteUserEx(request, runtime);
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteUserEx(request: DeleteUserRequest, runtime: RuntimeOptions): DeleteUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetUserModel {
  headers?: map[string]string(name='headers'),
  body: GetUserResponse(name='body'),
}

/**
 * 获取用户详细信息，普通用户只能获取自己的信息，管理员可以获取任意用户的信息。
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getUser(request: GetUserRequest) throws: GetUserModel  {
  var runtime = new RuntimeOptions{};
  return getUserEx(request, runtime);
}

/**
 * 获取用户详细信息，普通用户只能获取自己的信息，管理员可以获取任意用户的信息。
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getUserEx(request: GetUserRequest, runtime: RuntimeOptions): GetUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ImportUserModel {
  headers?: map[string]string(name='headers'),
  body: BaseUserResponse(name='body'),
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function importUser(request: ImportUserRequest) throws: ImportUserModel  {
  var runtime = new RuntimeOptions{};
  return importUserEx(request, runtime);
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api importUserEx(request: ImportUserRequest, runtime: RuntimeOptions): ImportUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/import`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListUsersModel {
  headers?: map[string]string(name='headers'),
  body: ListUserResponse(name='body'),
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listUsers(request: ListUserRequest) throws: ListUsersModel  {
  var runtime = new RuntimeOptions{};
  return listUsersEx(request, runtime);
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listUsersEx(request: ListUserRequest, runtime: RuntimeOptions): ListUsersModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model RemoveUserFromSubdomainModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function removeUserFromSubdomain(request: RemoveUserFromSubdomainRequest) throws: RemoveUserFromSubdomainModel  {
  var runtime = new RuntimeOptions{};
  return removeUserFromSubdomainEx(request, runtime);
}

/**
 * 只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api removeUserFromSubdomainEx(request: RemoveUserFromSubdomainRequest, runtime: RuntimeOptions): RemoveUserFromSubdomainModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/remove_user_from_subdomain`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchUserModel {
  headers?: map[string]string(name='headers'),
  body: ListUserResponse(name='body'),
}

/**
 * 该接口将会根据条件查询用户，只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function searchUser(request: SearchUserRequest) throws: SearchUserModel  {
  var runtime = new RuntimeOptions{};
  return searchUserEx(request, runtime);
}

/**
 * 该接口将会根据条件查询用户，只有管理员可以调用
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api searchUserEx(request: SearchUserRequest, runtime: RuntimeOptions): SearchUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/search`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateUserModel {
  headers?: map[string]string(name='headers'),
  body: UpdateUserResponse(name='body'),
}

/**
 * 用户可以修改自己的description，nick_name，avatar；
 * 管理员在用户基础上还可修改status（可以修改任意用户）；
 * 超级管理员在管理员基础上还可修改role（可以修改任意用户）。
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateUser(request: UpdateUserRequest) throws: UpdateUserModel  {
  var runtime = new RuntimeOptions{};
  return updateUserEx(request, runtime);
}

/**
 * 用户可以修改自己的description，nick_name，avatar；
 * 管理员在用户基础上还可修改status（可以修改任意用户）；
 * 超级管理员在管理员基础上还可修改role（可以修改任意用户）。
 * @tags user
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateUserEx(request: UpdateUserRequest, runtime: RuntimeOptions): UpdateUserModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/user/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListViewsModel {
  headers?: map[string]string(name='headers'),
  body: ListViewsResponse(name='body'),
}

/**
 * 列举View列表
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listViews(request: ListViewsRequest) throws: ListViewsModel  {
  var runtime = new RuntimeOptions{};
  return listViewsEx(request, runtime);
}

/**
 * 列举View列表
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listViewsEx(request: ListViewsRequest, runtime: RuntimeOptions): ListViewsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/View/list`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model MergeModel {
  headers?: map[string]string(name='headers'),
  body: MergeFaceGroupResponse(name='body'),
}

/**
 * 该接口将会对两个人脸分组进行合并
 * @tags face_group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function merge(request: MergeFaceGroupRequest) throws: MergeModel  {
  var runtime = new RuntimeOptions{};
  return mergeEx(request, runtime);
}

/**
 * 该接口将会对两个人脸分组进行合并
 * @tags face_group
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api mergeEx(request: MergeFaceGroupRequest, runtime: RuntimeOptions): MergeModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/albums/face_group/merge`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UnassignFacegroupItemModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 该接口将会对移除人脸分组中指定的图片
 * @tags albums
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function unassignFacegroupItem(request: UnAssignFaceGroupItemRequest) throws: UnassignFacegroupItemModel  {
  var runtime = new RuntimeOptions{};
  return unassignFacegroupItemEx(request, runtime);
}

/**
 * 该接口将会对移除人脸分组中指定的图片
 * @tags albums
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api unassignFacegroupItemEx(request: UnAssignFaceGroupItemRequest, runtime: RuntimeOptions): UnassignFacegroupItemModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/albums/unassign_facegroup_item`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateStoryModel {
  headers?: map[string]string(name='headers'),
  body: CreateStoryResponse(name='body'),
}

/**
 * 该接口将会创建故事
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createStory(request: CreateStoryRequest) throws: CreateStoryModel  {
  var runtime = new RuntimeOptions{};
  return createStoryEx(request, runtime);
}

/**
 * 该接口将会创建故事
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createStoryEx(request: CreateStoryRequest, runtime: RuntimeOptions): CreateStoryModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/create_story`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteStoryModel {
  headers?: map[string]string(name='headers'),
  body: DeleteStoryResponse(name='body'),
}

/**
 * 该接口将会删除故事
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteStory(request: DeleteStoryRequest) throws: DeleteStoryModel  {
  var runtime = new RuntimeOptions{};
  return deleteStoryEx(request, runtime);
}

/**
 * 该接口将会删除故事
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteStoryEx(request: DeleteStoryRequest, runtime: RuntimeOptions): DeleteStoryModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/delete_story`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model FindStoriesModel {
  headers?: map[string]string(name='headers'),
  body: FindStoriesResponse(name='body'),
}

/**
 * 该接口将会查询故事列表
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function findStories(request: FindStoriesRequest) throws: FindStoriesModel  {
  var runtime = new RuntimeOptions{};
  return findStoriesEx(request, runtime);
}

/**
 * 该接口将会查询故事列表
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api findStoriesEx(request: FindStoriesRequest, runtime: RuntimeOptions): FindStoriesModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/find_stories`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetPhotoCountModel {
  headers?: map[string]string(name='headers'),
  body: GetImageCountResponse(name='body'),
}

/**
 * 该接口将返回用户Drive下的云照片个数
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getPhotoCount(request: GetImageCountRequest) throws: GetPhotoCountModel  {
  var runtime = new RuntimeOptions{};
  return getPhotoCountEx(request, runtime);
}

/**
 * 该接口将返回用户Drive下的云照片个数
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getPhotoCountEx(request: GetImageCountRequest, runtime: RuntimeOptions): GetPhotoCountModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/get_photo_count`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetStoryModel {
  headers?: map[string]string(name='headers'),
  body: GetStoryResponse(name='body'),
}

/**
 * 该接口将会获取故事详情
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getStory(request: GetStoryRequest) throws: GetStoryModel  {
  var runtime = new RuntimeOptions{};
  return getStoryEx(request, runtime);
}

/**
 * 该接口将会获取故事详情
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getStoryEx(request: GetStoryRequest, runtime: RuntimeOptions): GetStoryModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/get_story`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListAddressGroupsModel {
  headers?: map[string]string(name='headers'),
  body: ListImageAddressGroupsResponse(name='body'),
}

/**
 * 该接口将会展示用户图片的地点分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listAddressGroups(request: ListImageAddressGroupsRequest) throws: ListAddressGroupsModel  {
  var runtime = new RuntimeOptions{};
  return listAddressGroupsEx(request, runtime);
}

/**
 * 该接口将会展示用户图片的地点分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listAddressGroupsEx(request: ListImageAddressGroupsRequest, runtime: RuntimeOptions): ListAddressGroupsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/list_address_groups`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFacegroupsModel {
  headers?: map[string]string(name='headers'),
  body: ListImageFaceGroupsResponse(name='body'),
}

/**
 * 该接口将会列举人脸分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listFacegroups(request: ListImageFaceGroupsRequest) throws: ListFacegroupsModel  {
  var runtime = new RuntimeOptions{};
  return listFacegroupsEx(request, runtime);
}

/**
 * 该接口将会列举人脸分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listFacegroupsEx(request: ListImageFaceGroupsRequest, runtime: RuntimeOptions): ListFacegroupsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/list_facegroups`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListTagsModel {
  headers?: map[string]string(name='headers'),
  body: ListImageTagsResponse(name='body'),
}

/**
 * 该接口将会展示场景标记
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function listTags(request: ListImageTagsRequest) throws: ListTagsModel  {
  var runtime = new RuntimeOptions{};
  return listTagsEx(request, runtime);
}

/**
 * 该接口将会展示场景标记
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api listTagsEx(request: ListImageTagsRequest, runtime: RuntimeOptions): ListTagsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/list_tags`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ParseKeywordsModel {
  headers?: map[string]string(name='headers'),
  body: ParseKeywordsResponse(name='body'),
}

/**
 * 该接口将会对用户输入内容语义解析出标签，地点，时间
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function parseKeywords(request: ParseKeywordsRequest) throws: ParseKeywordsModel  {
  var runtime = new RuntimeOptions{};
  return parseKeywordsEx(request, runtime);
}

/**
 * 该接口将会对用户输入内容语义解析出标签，地点，时间
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api parseKeywordsEx(request: ParseKeywordsRequest, runtime: RuntimeOptions): ParseKeywordsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/parse_keywords`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model SearchAddressGroupsModel {
  headers?: map[string]string(name='headers'),
  body: SearchImageAddressGroupsResponse(name='body'),
}

/**
 * 该接口将会展示用户图片的地点分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function searchAddressGroups(request: SearchImageAddressGroupsRequest) throws: SearchAddressGroupsModel  {
  var runtime = new RuntimeOptions{};
  return searchAddressGroupsEx(request, runtime);
}

/**
 * 该接口将会展示用户图片的地点分组
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api searchAddressGroupsEx(request: SearchImageAddressGroupsRequest, runtime: RuntimeOptions): SearchAddressGroupsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/search_address_groups`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateFacegroupInfoModel {
  headers?: map[string]string(name='headers'),
  body: UpdateFaceGroupInfoResponse(name='body'),
}

/**
 * 该接口将会更新人脸分组信息
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateFacegroupInfo(request: UpdateFaceGroupInfoRequest) throws: UpdateFacegroupInfoModel  {
  var runtime = new RuntimeOptions{};
  return updateFacegroupInfoEx(request, runtime);
}

/**
 * 该接口将会更新人脸分组信息
 * @tags image
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateFacegroupInfoEx(request: UpdateFaceGroupInfoRequest, runtime: RuntimeOptions): UpdateFacegroupInfoModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/image/update_facegroup_info`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model AddFileModel {
  headers?: map[string]string(name='headers'),
  body: AddViewFileResponse(name='body'),
}

/**
 * 视图添加文件
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error StateConflict User operation is not valid.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
async function addFile(request: AddViewFileRequest) throws: AddFileModel  {
  var runtime = new RuntimeOptions{};
  return addFileEx(request, runtime);
}

/**
 * 视图添加文件
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error StateConflict User operation is not valid.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
api addFileEx(request: AddViewFileRequest, runtime: RuntimeOptions): AddFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/add_file`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model CreateViewModel {
  headers?: map[string]string(name='headers'),
  body: CreateViewResponse(name='body'),
}

/**
 * 该接口将会创建一个逻辑视图
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function createView(request: CreateViewRequest) throws: CreateViewModel  {
  var runtime = new RuntimeOptions{};
  return createViewEx(request, runtime);
}

/**
 * 该接口将会创建一个逻辑视图
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api createViewEx(request: CreateViewRequest, runtime: RuntimeOptions): CreateViewModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/create`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model DeleteViewModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 删除指定view_id对应的View
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function deleteView(request: DeleteViewRequest) throws: DeleteViewModel  {
  var runtime = new RuntimeOptions{};
  return deleteViewEx(request, runtime);
}

/**
 * 删除指定view_id对应的View
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api deleteViewEx(request: DeleteViewRequest, runtime: RuntimeOptions): DeleteViewModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/delete`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model GetViewModel {
  headers?: map[string]string(name='headers'),
  body: GetViewResponse(name='body'),
}

/**
 * 获取指定view_id对应的View详细信息。
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function getView(request: GetViewRequest) throws: GetViewModel  {
  var runtime = new RuntimeOptions{};
  return getViewEx(request, runtime);
}

/**
 * 获取指定view_id对应的View详细信息。
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api getViewEx(request: GetViewRequest, runtime: RuntimeOptions): GetViewModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/get`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ViewListFileModel {
  headers?: map[string]string(name='headers'),
  body: ListViewFilesResponse(name='body'),
}

/**
 * 获取视图文件列表
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
async function viewListFile(request: ListViewFilesRequest) throws: ViewListFileModel  {
  var runtime = new RuntimeOptions{};
  return viewListFileEx(request, runtime);
}

/**
 * 获取视图文件列表
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
api viewListFileEx(request: ListViewFilesRequest, runtime: RuntimeOptions): ViewListFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/list_file`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model ListFileViewsModel {
  headers?: map[string]string(name='headers'),
  body: ListFileViewsResponse(name='body'),
}

/**
 * 列出文件关联视图
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
async function listFileViews(request: ListFileViewsRequest) throws: ListFileViewsModel  {
  var runtime = new RuntimeOptions{};
  return listFileViewsEx(request, runtime);
}

/**
 * 列出文件关联视图
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
api listFileViewsEx(request: ListFileViewsRequest, runtime: RuntimeOptions): ListFileViewsModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/list_file_views`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 200)) {
    obj = Util.readAsJSON(__response.body);
    respMap = Util.assertAsMap(obj);
    return {
      body = respMap,
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model RemoveFileModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 从视图中删除文件
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
async function removeFile(request: RemoveViewFileRequest) throws: RemoveFileModel  {
  var runtime = new RuntimeOptions{};
  return removeFileEx(request, runtime);
}

/**
 * 从视图中删除文件
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error Forbidden User not authorized to operate on the specified APIs.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error TooManyRequests Too many requests
 * @error InternalError The request has been failed due to some unknown error.
 */
api removeFileEx(request: RemoveViewFileRequest, runtime: RuntimeOptions): RemoveFileModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/remove_file`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

model UpdateViewModel {
  headers?: map[string]string(name='headers'),
}

/**
 * 更新指定view的相关信息
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error undefined undefined
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
async function updateView(request: UpdateViewRequest) throws: UpdateViewModel  {
  var runtime = new RuntimeOptions{};
  return updateViewEx(request, runtime);
}

/**
 * 更新指定view的相关信息
 * @tags view
 * @error InvalidParameter The input parameter {parameter_name} is not valid.
 * @error AccessTokenInvalid AccessToken is invalid. {message}
 * @error ForbiddenNoPermission No Permission to access resource {resource_name}.
 * @error NotFound The resource {resource_name} cannot be found. Please check.
 * @error undefined undefined
 * @error InternalError The request has been failed due to some unknown error.
 * @error ServiceUnavailable The request has failed due to a temporary failure of the server.
 */
api updateViewEx(request: UpdateViewRequest, runtime: RuntimeOptions): UpdateViewModel  {
  var accesskeyId = getAccessKeyId();
  var accessKeySecret = getAccessKeySecret();
  var securityToken = getSecurityToken();
  var accessToken = getAccessToken();
  var realReq = Util.toMap(request);
  __request.protocol = Util.defaultString(@protocol, 'https');
  __request.method = 'POST';
  __request.pathname = getPathname(@nickname, `/v2/view/update`);
  __request.headers = {
    user-agent = getUserAgent(),
    host = Util.defaultString(@endpoint, `${@domainId}.api.aliyunpds.com`),
    content-type = 'application/json; charset=utf-8',
    ...request.httpheaders
  };
  realReq.httpheaders = null;

  if (!Util.empty(accessToken)) {
    __request.headers.authorization = `Bearer ${accessToken}`;
  } else if (!Util.empty(accesskeyId) && !Util.empty(accessKeySecret)) {
    if (!Util.empty(securityToken)) {
      __request.headers.x-acs-security-token = securityToken;
    }
    __request.headers.date = Util.getDateUTCString();
    __request.headers.accept = 'application/json';
    __request.headers.x-acs-signature-method = 'HMAC-SHA1';
    __request.headers.x-acs-signature-version = '1.0';
    var stringToSign = ROAUtil.getStringToSign(__request);
    __request.headers.authorization = `acs ${accesskeyId}:${ROAUtil.getSignature(stringToSign, accessKeySecret)}`;
  }
  __request.body = Util.toJSONString(realReq);
} returns {
  var respMap : object = null;
  var obj : any = null;
  if (Util.equalNumber(__response.statusCode, 204)) {
    return {
      headers =  __response.headers,
    };
  }

  if (!Util.empty(__response.headers.x-ca-error-message)) {
    throw {
      data = {
        requestId = __response.headers.x-ca-request-id,
        statusCode = __response.statusCode,
        statusMessage = __response.statusMessage,
      },
      message = __response.headers.x-ca-error-message,
    };
  }
  obj = Util.readAsJSON(__response.body);
  respMap = Util.assertAsMap(obj);
  throw {
    data = {
      requestId = __response.headers.x-ca-request-id,
      statusCode = __response.statusCode,
      statusMessage = __response.statusMessage,
    },
    ...respMap,
  };
} runtime {
  timeouted = 'retry',
  readTimeout = runtime.readTimeout,
  connectTimeout = runtime.connectTimeout,
  localAddr = runtime.localAddr,
  httpProxy = runtime.httpProxy,
  httpsProxy = runtime.httpsProxy,
  noProxy = runtime.noProxy,
  maxIdleConns = runtime.maxIdleConns,
  socks5Proxy = runtime.socks5Proxy,
  socks5NetWork = runtime.socks5NetWork,
  retry = {
    retryable = runtime.autoretry,
    maxAttempts = Util.defaultNumber(runtime.maxAttempts, 3),
  },
  backoff = {
    policy = Util.defaultString(runtime.backoffPolicy, 'no'),
    period = Util.defaultNumber(runtime.backoffPeriod, 1),
  },
  ignoreSSL = runtime.ignoreSSL
}

/**
 * 
 */
model AccountAccessTokenResponse {
  accessToken: string(name='access_token', description='用于调用业务接口的accessToken', example='cnskjajkahwdhwialsnd'),
  avatar?: string(name='avatar', description='当前用户头像', example='cherry'),
  defaultDriveId?: string(name='default_drive_id', description='Default Drive ID', example='100'),
  defaultSboxDriveId?: string(name='default_sbox_drive_id', description='Default Sbox Drive ID', example='100'),
  deviceId?: string(name='device_id', description='device_id 通过device flow 绑定的设备ID', example='xxx'),
  deviceName?: string(name='device_name', description='device_name 通过device flow 绑定的设备名', example='xxx'),
  existLink?: [ LinkInfo ](name='exist_link', description='当前用户已存在的登录方式', example='', items='{"$ref":"#/definitions/LinkInfo"}'),
  expireTime?: string(name='expire_time', description='accessToken过期时间，ISO时间', example='2019-09-01T06:57:48.813Z'),
  expiresIn?: int64(name='expires_in', description='accessToken过期时间，单位秒', example=3600, format='int64'),
  isFirstLogin?: boolean(name='is_first_login', description='用户是否为第一次登录', example=true),
  needLink: boolean(name='need_link', description='是否需要绑定', example=false),
  needRpVerify?: boolean(name='need_rp_verify', description='用户是否需要进行的实人认证', example=true),
  nickName?: string(name='nick_name', description='当前用户昵称', example='cherry'),
  pinSetup?: boolean(name='pin_setup', description='用户的数据密码是否设置过', example=true),
  refreshToken?: string(name='refresh_token', description='用于刷新accessToken', example='cnskjajkahwdhwialsnd'),
  role?: string(name='role', description='当前用户角色', example='user'),
  state?: string(name='state', description='临时权限，用于登录成功后设置密码', example='klafhjas-asdasd-asd-as-d-asd-asd-asdasd'),
  status?: string(name='status', description='当前用户状态', example='enabled'),
  subdomainId?: string(name='subdomain_id', description='subdomain_id 用户登录的subdomain_id', example='xxx'),
  tokenType?: string(name='token_type', description='accessToken类型，Bearer', example='Bearer'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='当前用户ID', example='DING-xxxxx'),
  userName?: string(name='user_name', description='当前用户名', example='cherry'),
}

/**
 * 
 */
model AccountLinkRequest {
  httpheaders?: map[string]string,
  detail?: string(name='detail', description='账号信息', example='{name:jack,age:20}'),
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208333333'),
  status?: string(name='status', description='状态', example='normal'),
  type: string(name='type', description='认证类型', example='mobile'),
  userId: string(name='user_id', description='绑定的user_id', example='123987123617823'),
}

/**
 * 
 */
model AccountTokenRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  grantType: string(name='grant_type', description='只能填refresh_token', example='refresh_token'),
  refreshToken: string(name='refresh_token', description='refresh token, 登录时返回的', example='ybb3WJy2CwXHoM6hBcydGlvzMoJkFpkk'),
}

/**
 * 
 */
model ActionDetail {
  create?: CreateDetail(name='create'),
  delete?: DeleteDetail(name='delete'),
  edit?: EditDetail(name='edit'),
  move?: MoveDetail(name='move'),
  rename?: RenameDetail(name='rename'),
  restore?: RestoreDetail(name='restore'),
  trash?: TrashDetail(name='trash'),
}

/**
 * 
 */
model ActionItem {
  action?: string(name='action'),
  effect?: string(name='effect'),
  inherited?: boolean(name='inherited'),
  inheritedFrom?: string(name='inherited_from'),
}

/**
 * 
 */
model Actor {
  aliUser?: ActorAliUser(name='ali_user'),
  anonymousUser?: ActorAnonymousUser(name='anonymous_user'),
  system?: ActorSystem(name='system'),
  user?: ActorUser(name='user'),
}

/**
 * 
 */
model ActorAliUser {
  aliUserId?: string(name='ali_user_id', description='AliUserID'),
  aliUserType?: string(name='ali_user_type', description='AliUserType'),
}

/**
 * 
 */
model ActorAnonymousUser {
}

/**
 * 
 */
model ActorSystem {
  eventType?: string(name='event_type', description='EventType'),
}

/**
 * 
 */
model ActorUser {
  userId?: string(name='user_id', description='UserID'),
  userName?: string(name='user_name', description='UserName'),
}

/**
 * 
 */
model AddStoreRequest {
  basePath?: string(name='base_path', description='存储公共前缀', example='ccp-data'),
  bucket?: string(name='bucket', description='bucket名称', example='data-sz-bucket'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  endpoint: string(name='endpoint', description='存储访问地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  ownership?: string(name='ownership', default='system', description='存储归属，system表示系统提供，custom表示使用自己的存储', enum='system, custom', example='system'),
  roleArn?: string(name='role_arn', description='访问Bucket的角色ARN', example='acs:oss:*:*:*'),
  type: string(name='type', description='存储类型，当前只支持oss', enum='oss', example='oss'),
}

/**
 * 
 */
model AppAccessStrategy {
  effect?: string(name='effect'),
  exceptAppIdList?: [ string ](name='except_app_id_list', items='{"type":"string"}'),
}

/**
 * 预览压缩包结构
 */
model ArchiveListRequest {
  Format?: string(name='Format', description='格式类型，如果是uc，使用特殊格式'),
  RequestID?: string(name='RequestID'),
  archiveType?: string(name='archive_type'),
  domainId?: string(name='domain_id'),
  driveId?: string(name='drive_id', description='TODO 增加对ShareID的支持'),
  fileId?: string(name='file_id'),
  password?: string(name='password'),
}

/**
 * 预览压缩包结构 response
 */
model ArchiveListResponse {
  fileList?: object(name='file_list', additionalProperties='{"type":"object"}'),
  state?: string(name='state'),
  taskId?: string(name='task_id'),
}

/**
 * ArchiveStatusResponse response
 */
model ArchiveStatusResponse {
  fileList?: object(name='file_list', additionalProperties='{"type":"object"}'),
  progress?: int64(name='progress', format='int64'),
  state?: string(name='state'),
  taskId?: string(name='task_id'),
}

/**
 * 解压
 */
model ArchiveUncompressRequest {
  Format?: string(name='Format', description='格式类型，如果是uc，使用特殊格式'),
  RequestID?: string(name='RequestID'),
  archiveType?: string(name='archive_type'),
  domainId?: string(name='domain_id'),
  driveId?: string(name='drive_id', description='TODO 增加对ShareID的支持'),
  fileId?: string(name='file_id'),
  fileList?: [ string ](name='file_list', items='{"type":"string"}'),
  password?: string(name='password'),
  targetDriveId?: string(name='target_drive_id'),
  targetFileId?: string(name='target_file_id'),
}

/**
 * 解压 response
 */
model ArchiveUncompressResponse {
  state?: string(name='state'),
  taskId?: string(name='task_id'),
}

/**
 * 
 */
model AuthConfig {
  appId?: string(name='app_id'),
  appSecret?: string(name='app_secret'),
  callbackSecurity?: boolean(name='callback_security'),
  enable?: boolean(name='enable'),
  endpoint?: string(name='endpoint'),
  enterpriseId?: string(name='enterprise_id'),
  ldapConfig?: LdapConfig(name='ldap_config'),
  loginPageHeaders?: object(name='login_page_headers', additionalProperties='{"type":"string"}'),
  loginPageTemplate?: string(name='login_page_template'),
  loginPageVars?: object(name='login_page_vars', additionalProperties='{"type":"object"}'),
  whiteListConfig?: object(name='white_list_config', additionalProperties='{"type":"object"}'),
  whiteListEnable?: boolean(name='white_list_enable'),
}

/**
 * 
 */
model AuthorizeRequest {
  ClientID: string(name='ClientID', description='Client ID, 此处填写创建App时返回的AppID', example='aksjoiajsoias'),
  DomainID?: string(name='DomainID', description='内部使用'),
  HideConsent?: boolean(name='HideConsent', default=true, description='是否隐藏同意页面', example=true),
  LoginType?: string(name='LoginType', default='ding', description='鉴权方式，目前支持ding,ram鉴权', example='ding'),
  RedirectUri: string(name='RedirectUri', description='回调地址, 此处填写创建App时填写的回调地址', example='https://app.com/callback'),
  ResponseType: string(name='ResponseType', description='返回类型, 只能填写code', example='code'),
  Scope?: [ string ](name='Scope', description='申请的权限列表, 默认为所有权限', items='{"type":"string"}'),
  State?: string(name='State', description='用户自定义字段，会在鉴权成功后的callback带回'),
  UserCode?: string(name='UserCode', description='内部使用'),
}

/**
 * 
 */
model BackUpConfig {
  folderId?: string(name='folder_id', description='folder_id'),
  photoFolderId?: string(name='photo_folder_id', description='photo_folder_id'),
  subFolder?: object(name='sub_folder', additionalProperties='{"type":"string"}', description='sub_folder'),
  videoFolderId?: string(name='video_folder_id', description='video_folder_id'),
}

/**
 * 
 */
model BaseAdditionDataRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
}

/**
 * Base file response
 */
model BaseCCPFileResponse {
  actionList?: [ string ](name='action_list', description='action_list', items='{"type":"string"}'),
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  characteristicHash?: string(name='characteristic_hash', description='CharacteristicHash'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  customField1?: string(name='custom_field_1', description='custom_field_1'),
  customField2?: string(name='custom_field_2', description='custom_field_2'),
  customType?: string(name='custom_type', description='custom_type'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  lastModifierId?: string(name='last_modifier_id', description='last_modifier_id', example='123abc'),
  lastModifierName?: string(name='last_modifier_name', description='last_modifier_name', example='test_user'),
  lastModifierType?: string(name='last_modifier_type', description='last_modifier_type', example='User, AliUser'),
  meta?: string(name='meta'),
  mimeExtension?: string(name='mime_extension', description='mime_extension', example='mov'),
  mimeType?: string(name='mime_type', description='mime_type', example='video/quicktime'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  punishFlag?: int64(name='punish_flag', description='PunishFlag', format='int64'),
  shareId?: string(name='share_id'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  userTags?: object(name='user_tags', additionalProperties='{"type":"string"}', description='user_tags'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * complete file request
 */
model BaseCompleteFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id'),
  uploadId?: string(name='upload_id', description='upload_id'),
}

/**
 * create file request
 */
model BaseCreateFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  contentMd5?: string(name='content_md5', description='ContentMd5', example='E10ADC3949BA59ABBE56E057F20F883E'),
  contentType?: string(name='content_type', description='ContentType', example='application/json'),
  name: string(name='name', description='Name', example='ccp.jpg', maxLength=1024, minLength=1),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  size?: int64(name='size', description='Size', format='int64', minimum=0),
  type: string(name='type', description='Type', enum='file, folder', example='file'),
}

/**
 * Base drive response
 */
model BaseDriveResponse {
  actionList?: [ string ](name='action_list', items='{"type":"string"}'),
  creator?: string(name='creator', description='Drive 创建者', example='ccp'),
  description?: string(name='description', description='Drive 备注信息', example='ccp team drive'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive'),
  driveType?: string(name='drive_type', description='Drive 类型', example='normal'),
  encryptDataAccess?: boolean(name='encrypt_data_access'),
  encryptMode?: string(name='encrypt_mode'),
  owner?: string(name='owner', description='Drive 所有者', example='ccp'),
  ownerType?: string(name='owner_type', description='Drive 所有者类型', example='user'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  relativePath?: string(name='relative_path', description='Drive存储基于store的相对路径，domain的PathType为OSSPath时返回', example='/a/b/e/'),
  status?: string(name='status', description='Drive 状态', example='enabled'),
  storeId?: string(name='store_id', description='存储 ID, domain的PathType为OSSPath时返回', example='123'),
  totalSize?: int64(name='total_size', description='Drive 空间总量', example=102400, format='int64'),
  usedSize?: int64(name='used_size', description='Drive 空间已使用量', example=1024, format='int64'),
}

/**
 * list_file_by_anonymous base response
 */
model BaseFileAnonymousResponse {
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  name?: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  size?: int64(name='size', description='size, type=file时才有效', example=1024, format='int64', minimum=0),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
}

/**
 * 
 */
model BaseFileProcessRequest {
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取文件上传URL
 */
model BaseGetUploadUrlRequest {
  contentMd5?: string(name='content_md5', description='content_md5', example='E10ADC3949BA59ABBE56E057F20F883E', maxLength=32),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='upload_part_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id'),
  uploadId: string(name='upload_id', description='upload_id', example='3920F2BE4D9446D6967E2ED505A97EFD'),
}

/**
 * Base file response
 */
model BaseHostingFileResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * Base image process
 */
model BaseImageProcessRequest {
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * list file request
 */
model BaseListFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int64(name='limit', default=50, description='limit', example=10, format='int64', maximum=200, minimum=0),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 
 */
model BaseMediaResponse {
  addressLine?: string(name='address_line', description='address_line', example='北京市昌平区白各庄新村路'),
  city?: string(name='city', description='city', example='杭州'),
  country?: string(name='country', description='country', example='中国'),
  district?: string(name='district', description='district', example='余杭区'),
  height?: int64(name='height', default=0, description='height', example=720, format='int64'),
  imageTags?: [ SystemTag ](name='image_tags', description='system_tags', items='{"$ref":"#/definitions/SystemTag"}'),
  location?: string(name='location', description='location', example='40.110333,116.349311'),
  province?: string(name='province', description='province', example='浙江省'),
  time?: string(name='time', description='time', format='date-time'),
  township?: string(name='township', description='township', example='沙河镇'),
  width?: int64(name='width', default=0, description='width', example=1024, format='int64'),
}

/**
 * 文件移动请求
 */
model BaseMoveFileRequest {
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', maxLength=1024, minLength=1),
  shareId?: string(name='share_id'),
}

/**
 * list_share_link response
 */
model BaseShareLinkResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z', format='date-time'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='desc'),
  downloadCount?: int64(name='download_count', description='下载次数', example=1, format='int64'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z', format='date-time'),
  expired?: boolean(name='expired', description='expired', example=false),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d'),
  fileIdList?: [ string ](name='file_id_list', description='file_id_list', example='5d5b846942cf94fa72324c14a4bda34e81da635d, file_id_2', items='{"type":"string"}'),
  filePathList?: [ string ](name='file_path_list', description='file_id_list', example='/SD2/, /HD2/', items='{"type":"string"}'),
  previewCount?: int64(name='preview_count', description='preview_count', example=1, format='int64'),
  saveCount?: int64(name='save_count', description='转存次数', example=1, format='int64'),
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
  shareMsg?: string(name='share_msg', description='share_msg', example='复制这条消息并打开app，即可跳转到对应的分享页面'),
  shareName?: string(name='share_name', description='share_name', example='name'),
  sharePolicy?: string(name='share_policy', description='share_policy', enum='url, msg', example='url'),
  sharePwd?: string(name='share_pwd', description='share_pwd', example='12ABcd'),
  shareUrl?: string(name='share_url', description='share_url', example='https://www.aliyundrive.com/sharelinks/index/abcdefghi'),
  status?: string(name='status', description='status', example='xxx'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z', format='date-time'),
}

/**
 * List share response
 */
model BaseShareResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='share description'),
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  expired?: boolean(name='expired', description='expired', example=false),
  owner?: string(name='owner', description='owner', example='xxx'),
  ownerType?: string(name='owner_type', description='owner', example='xxx'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFileId?: string(name='share_file_id', description='share_file_id'),
  shareFilePath?: string(name='share_file_path', description='share_path', example='/a/b/c/'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', example='enabled'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z'),
}

/**
 * 批处理
 */
model BatchRequest {
  httpheaders?: map[string]string,
  requests: [ BatchSubRequest ](name='requests', description='Requests 请求合集', items='{"$ref":"#/definitions/BatchSubRequest"}'),
  resource: string(name='resource', description='支持的资源类型', example='"file"'),
}

/**
 * batch operation response
 */
model BatchResponse {
  responses?: [ BatchSubResponse ](name='responses', description='responses 返回结果合集', items='{"$ref":"#/definitions/BatchSubResponse"}'),
}

/**
 * 
 */
model BatchSubRequest {
  body?: object(name='body', additionalProperties='{"type":"object"}', description='body 子请求的请求参数 json 字符串，可参考对于子请求文档, 当指定了body 必须传headers ： "Content-Type" 对应的类型，目前子请求入参是"application/json"', example='{"drive_id":"101","file_id":"xxxxxx"}'),
  headers?: object(name='headers', additionalProperties='{"type":"string"}', description='headers 请求头，表示body传入数据的类型', example='{"Content-Type":"application/json"}'),
  id: string(name='id', description='id 用于request 和 response关联， 不允许重复', example='"1"'),
  method: string(name='method', description='method', enum='POST, GET, PUT, DELETE, HEAD', example='"POST"'),
  url: string(name='url', description='url 子请求的api path路径， 可参考对于子请求文档', example='/file/get'),
}

/**
 * 
 */
model BatchSubResponse {
  body?: object(name='body', additionalProperties='{"type":"object"}', description='body 子请求的返回结果，可参考对于子请求文档 json 字符串', example='{"drive_id":"101","file_id":"xxxxxx"}'),
  id?: string(name='id', description='id 请求带过来的id, 可以跟 request 进行关联', example='"1"'),
  status?: int64(name='status', description='status 子请求的返回状态码，可参考对于子请求文档', example=200, format='int64'),
}

/**
 * 打包下载
 */
model CCPArchiveFilesRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  files?: [ FileInfo ](name='files', items='{"$ref":"#/definitions/FileInfo"}'),
  name?: string(name='name', description='file_name', example='ccp.jpg', maxLength=1024, minLength=1),
}

/**
 * 打包下载response
 */
model CCPArchiveFilesResponse {
  asyncTaskId?: string(name='async_task_id'),
}

/**
 * 
 */
model CCPArchiveRequest {
  Format?: string(name='Format', description='格式类型，如果是uc，使用特殊格式'),
  RequestID?: string(name='RequestID'),
  archiveType?: string(name='archive_type'),
  domainId?: string(name='domain_id'),
  driveId?: string(name='drive_id', description='TODO 增加对ShareID的支持'),
  fileId?: string(name='file_id'),
  password?: string(name='password'),
}

/**
 * 
 */
model CCPArchiveResponse {
  state?: string(name='state'),
}

/**
 * 获取文件夹size信息
 */
model CCPGetDirSizeInfoRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
}

/**
 * 获取分享中文件媒体播放地址的请求body
 */
model CCPGetShareLinkVideoPreviewPlayInfoRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  category?: string(name='category', description='category', enum='live_transcoding', example='live_transcoding'),
  fileId?: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  getPreviewUrl?: boolean(name='get_preview_url', description='get_preview_url', example=true),
  getSubtitleInfo?: boolean(name='get_subtitle_info', description='get_subtitle_info', example=true),
  getWithoutUrl?: boolean(name='get_without_url', description='get_without_url', example=true),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  referer?: string(name='referer'),
  shareId: string(name='share_id', description='share_id is required', example='Agg1RL8pw96'),
  signToken?: string(name='sign_token'),
  subtitleLanguageList?: [ string ](name='subtitle_language_list', description='subtitle_language_list, 根据语言获取压制在视频中的字幕, 不传则取所有', example='eng', items='{"type":"string"}'),
  templateId?: string(name='template_id', description='template_id', example='HD'),
  urlExpireSec?: int64(name='url_expire_sec', default=300, description='url_expire_sec', example=15, format='int64', maximum=600, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取分享中媒体播放地址response
 */
model CCPGetShareLinkVideoPreviewPlayInfoResponse {
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  videoPreviewPlayInfo?: VideoPreviewPlayInfoResponse(name='video_preview_play_info'),
}

/**
 * 获取转码信息请求
 */
model CCPGetVideoPreviewPlayInfoRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  category?: string(name='category', description='category', enum='live_transcoding', example='live_transcoding'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  getPreviewUrl?: boolean(name='get_preview_url', description='get_preview_url', example=true),
  getSubtitleInfo?: boolean(name='get_subtitle_info', description='get_subtitle_info', example=true),
  getWithoutUrl?: boolean(name='get_without_url', description='get_without_url', example=true),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='Agg1RL8pw96'),
  signToken?: string(name='sign_token'),
  subtitleLanguageList?: [ string ](name='subtitle_language_list', description='subtitle_language_list, 根据语言获取压制在视频中的字幕, 不传则取所有', example='eng', items='{"type":"string"}'),
  templateId?: string(name='template_id', description='template_id', example='HD'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
}

/**
 * 获取转码信息响应
 */
model CCPGetVideoPreviewPlayInfoResponse {
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  videoPreviewPlayInfo?: VideoPreviewPlayInfoResponse(name='video_preview_play_info'),
}

/**
 * 触发实时转码
 */
model CCPLiveTranscodeRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  objectPath?: string(name='object_path', description='object_path', example='/86942B7D227C6F357DF9FCE06C8923017681B334_2753102__sha1_dev20001/SD/media-5.ts'),
}

/**
 * CCPLiveTranscodeResponse
 */
model CCPLiveTranscodeResponse {
}

/**
 * 遍历文件
 */
model CCPWalkFileRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  all?: boolean(name='all', default=true, description='all', enum='false, true', example=false),
  category?: string(name='category', description='category', enum='image, video, music, doc, other', example='image'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fields?: string(name='fields', description='fields', example='*'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int64(name='limit', default=50, description='limit', example=10, format='int64', maximum=200, minimum=0),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  orderBy?: string(name='order_by', description='order_by', enum='update_time, name', example='name'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
  parentFileId: string(name='parent_file_id', description='ParentFileID', example='root', maxLength=50, minLength=4, pattern='[a-z0-9.-_]{1,50}'),
  parentFileIdPath?: string(name='parent_file_id_path'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
  starred?: boolean(name='starred', description='starred', enum='false, true', example=false),
  status?: string(name='status', default='available', description='status', enum='uploading, available', example='available'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 列举文件response
 */
model CCPWalkFileResponse {
  items?: [ BaseCCPFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseCCPFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 
 */
model CancelLinkRequest {
  httpheaders?: map[string]string,
  temporaryToken: string(name='temporary_token', description='待绑定的临时token，此token只能访问绑定、取消绑定接口', example='ey***s='),
}

/**
 * 
 */
model CancelRPVerifyRequest {
  userId: string(name='user_id', description='User ID, 当前访问的用户', example='"2ef62459eb7a11ea932cacde48001122"'),
}

/**
 * cancel_share_link request
 */
model CancelShareLinkRequest {
  httpheaders?: map[string]string,
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
}

/**
 * 
 */
model Captcha {
  captcha: string(name='captcha', description='图片验证码，base64格式', example='iVBORw0KGgoAAAANSUhEUgAAAFAAAAAaCAIAAACvsEzwAAABRElEQVR42t3YsQ4CIQwA0CZ+i36Bg5uTo1/gqquDTvf1JwkJqRR7vZYCJ2HClOMBVw5h/i7P9yvU+X8LFFsju728wRNhcQR+gyj27G2GtQGHxy5USaN6PV1n2Qt8Ou6ZKllPJ/MQ4PN0CzXrs9i4jS2dIelKMuBse18vd1zdweHZdnC2V3kwDsm0OnYHMDVLtnQICbZ0XuIpqAamaaMjmGbvOAV0Fmqew7XAmXlV0kqButcYhDs5PqYiGA9dDm6atCK7bpbGx5Jknxszlj5pYR5t8QMX8b5gLMSVCZGfw4svdtHsDqZmPooHJxte5NTCnx3twKvKIhgLcaXrSbP0iGBhIK/99aXlnrQst1/7BajDt7Txxl/rrqvuBOaGJY3Szt4GOBuoka2LhQYw/ic1eyww/5eV95x229IDmqHlS1vdrOjkA5iK2BYUhM2zAAAAAElFTkSuQmCC'),
  captchaFormat: string(name='captcha_format', description='图片格式', example='png'),
  captchaId: string(name='captcha_id', description='图片验证码ID', example='f4690fc255e2fb24c10ede079d3802b4cClRimRh67Q'),
}

/**
 * 
 */
model CertInfo {
  CertID?: string(name='CertID'),
  certBody: string(name='cert_body', description='cert body', example='xxxxxxxxxxx'),
  certName: string(name='cert_name', description='cert name', example='mysite2020cert'),
  certPrivatekey: string(name='cert_privatekey', description='cert privatekey', example='yyyyyyyyyy'),
}

/**
 * 清空回收站
 */
model ClearRecycleBinRequest {
  httpheaders?: map[string]string,
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
}

/**
 * ClearRecycleBinResponse
 */
model ClearRecycleBinResponse {
  domainId?: string(name='domain_id', description='domain_id'),
  driveId?: string(name='drive_id', description='drive_id'),
  taskId?: string(name='task_id', description='task_id'),
}

/**
 * 合并文件上传任务
 */
model CompleteFileRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id'),
  uploadId?: string(name='upload_id', description='upload_id'),
}

/**
 * complete file response
 */
model CompleteFileResponse {
  actionList?: [ string ](name='action_list', description='action_list', items='{"type":"string"}'),
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  characteristicHash?: string(name='characteristic_hash', description='CharacteristicHash'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  customField1?: string(name='custom_field_1', description='custom_field_1'),
  customField2?: string(name='custom_field_2', description='custom_field_2'),
  customType?: string(name='custom_type', description='custom_type'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  lastModifierId?: string(name='last_modifier_id', description='last_modifier_id', example='123abc'),
  lastModifierName?: string(name='last_modifier_name', description='last_modifier_name', example='test_user'),
  lastModifierType?: string(name='last_modifier_type', description='last_modifier_type', example='User, AliUser'),
  location?: string(name='location', description='location'),
  meta?: string(name='meta'),
  mimeExtension?: string(name='mime_extension', description='mime_extension', example='mov'),
  mimeType?: string(name='mime_type', description='mime_type', example='video/quicktime'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  punishFlag?: int64(name='punish_flag', description='PunishFlag', format='int64'),
  shareId?: string(name='share_id'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamLocations?: object(name='stream_locations', additionalProperties='{"type":"string"}'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  userTags?: object(name='user_tags', additionalProperties='{"type":"string"}', description='user_tags'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * 
 */
model ConfirmLinkRequest {
  httpheaders?: map[string]string,
  temporaryToken: string(name='temporary_token', description='待绑定的临时token，此token只能访问绑定、取消绑定接口', example='ey***s='),
}

/**
 * 文件拷贝
 */
model CopyFileRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  autoRename?: boolean(name='auto_rename', default=false, description='auto_rename
type: boolean', example=false),
  batchId?: string(name='batch_id'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', maxLength=1024, minLength=1),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  toDriveId?: string(name='to_drive_id', description='to_drive_id', example='1', pattern='[0-9]+'),
  toParentFileId: string(name='to_parent_file_id', description='to_parent_file_id', example='root', maxLength=50, minLength=4, pattern='[a-z0-9.-_]{1,50}'),
  toShareId?: string(name='to_share_id', description='to_drive_id', example='1', pattern='[0-9]+'),
}

/**
 * 文件拷贝 response
 */
model CopyFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * 
 */
model CorsRule {
  allowedHeader?: [ string ](name='allowed_header', description='AllowedHeader', example='*', items='{"type":"string"}'),
  allowedMethod?: [ string ](name='allowed_method', description='AllowedMethod', example='PUT, GET', items='{"type":"string"}'),
  allowedOrigin?: [ string ](name='allowed_origin', description='AllowedOrigin', example='*', items='{"type":"string"}'),
  exposeHeader?: [ string ](name='expose_header', description='ExposeHeader', example='ETag', items='{"type":"string"}'),
  maxAgeSeconds?: int64(name='max_age_seconds', description='MaxAgeSeconds', example=0, format='int64'),
}

/**
 * 
 */
model CreateAppRequest {
  appName: string(name='app_name', description='App名称', example='图片分享应用', maxLength=128, minLength=1),
  description?: string(name='description', description='App描述', example='测试专用', maxLength=128, minLength=0),
  isThirdParty?: boolean(name='is_third_party', default=false, description='是否是domain私有App', example=false),
  logo: string(name='logo', description='App图标', example='https://app.com/logo.jpg'),
  publicKey: string(name='public_key', description='RSA加密算法的公钥, PEM格式', example='-----BEGIN RSA PUBLIC KEY-----****-----END RSA PUBLIC KEY-----'),
  redirectUri?: string(name='redirect_uri', description='App回调地址', example='https://app.com/callback'),
  scope: [ string ](name='scope', description='App权限列表', enum='FILE.ALL, SHARE.ALL, STORAGEFILE.ALL, STORAGE.ALL, DRIVE.ALL, USER.ALL', items='{"type":"string"}'),
  type: string(name='type', default='WebServer', description='App类型', enum='WebServer, WebBrowser, Native, JWT', example='WebServer'),
}

/**
 * 
 */
model CreateDetail {
  createType?: string(name='create_type', description='CreateType'),
  srcFileId?: string(name='src_file_id', description='SrcFileID'),
}

/**
 * create domain request
 */
model CreateDomainRequest {
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='启用钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='启用 RAM 认证', example=true),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainName: string(name='domain_name', description='Domain 名称', example='test_domain'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  initDriveEnable?: boolean(name='init_drive_enable', description='开启自动初始化 Drive', example=true),
  initDriveSize?: int64(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  mode: string(name='mode', description='Domain 类型', example='StandardMode'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  sharable?: boolean(name='sharable', description='开启分享', example=true),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
}

/**
 * create drive request
 */
model CreateDriveRequest {
  httpheaders?: map[string]string,
  default?: boolean(name='default', default=false, description='是否默认drive, 只允许设置一个默认drive', example=true),
  description?: string(name='description', description='描述信息', example='ccp team drive', maxLength=1024),
  driveName: string(name='drive_name', description='Drive 名称', example='ccpdrive', maxLength=1024),
  driveType?: string(name='drive_type', default='normal', description='Drive类型', enum='normal, large', example='normal'),
  encryptMode?: string(name='encrypt_mode'),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  owner: string(name='owner', description='所属者', example='ccp-001'),
  ownerType: string(name='owner_type', description='所属者', example='ccp-001'),
  relativePath?: string(name='relative_path', description='domain的PathType为OSSPath时必选。 Drive存储基于store的相对路径', example='/d/e/f/'),
  status?: string(name='status', default='enabled', description='状态', enum='disabled, enabled', example='enabled'),
  storeId?: string(name='store_id', description='StoreID , domain的PathType为OSSPath时必选', example='store_id'),
  subdomainId?: string(name='subdomain_id', description='Subdomain ID', example='hz-123'),
  totalSize?: int64(name='total_size', default=-1, description='总大小,单位Byte [如果设置 -1 代表不限制]', example=1024, format='int64'),
}

/**
 * Create drive response
 */
model CreateDriveResponse {
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
}

/**
 * 创建文件
 */
model CreateFileRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  autoRename?: boolean(name='auto_rename'),
  checkNameMode?: string(name='check_name_mode', default='ignore', description='check_name_mode', enum='ignore, auto_rename, refuse'),
  contentHash?: string(name='content_hash', description='content_hash', example='7C4A8D09CA3762AF61E59520943DC26494F8941B'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentMd5?: string(name='content_md5', description='ContentMd5', example='E10ADC3949BA59ABBE56E057F20F883E'),
  contentType?: string(name='content_type', description='ContentType', example='application/json'),
  createReason?: string(name='create_reason'),
  customField1?: string(name='custom_field_1'),
  customField2?: string(name='custom_field_2'),
  customType?: string(name='custom_type'),
  description?: string(name='description', description='description', example='file description', maxLength=1024, minLength=0),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode'),
  fileId?: string(name='file_id', description='file_id'),
  forceUploadToLocation?: boolean(name='force_upload_to_location', description='force_upload_to_location'),
  hidden?: boolean(name='hidden', description='hidden', enum='true, false', example=false),
  imageMediaMetadata?: ImageMediaMetadata(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1, label2', items='{"type":"string"}'),
  lastUpdatedAt?: string(name='last_updated_at', description='last_updated_at', example='2019-08-20T06:51:27.292Z'),
  location?: string(name='location', description='location'),
  meta?: string(name='meta'),
  name: string(name='name', description='Name', example='ccp.jpg', maxLength=1024, minLength=1),
  parallelUpload?: boolean(name='parallel_upload'),
  parentFileId: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=4, pattern='[a-z0-9]{1,50}'),
  parentFileIdPath?: string(name='parent_file_id_path'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  preHash?: string(name='pre_hash', description='pre_hash', example='E10ADC3949BA59ABBE56E057F20F883E'),
  proofCode?: string(name='proof_code', description='proof_code'),
  proofVersion?: string(name='proof_version', description='proof_version', enum='v1'),
  shareId?: string(name='share_id', description='share_id
example'),
  size?: int64(name='size', description='Size', format='int64', minimum=0),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/FileStreamInfo"}', description='streams_info'),
  type: string(name='type', description='Type', enum='file, folder', example='file'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  videoMediaMetadata?: VideoMediaMetadata(name='video_media_metadata'),
}

/**
 * Create file response
 */
model CreateFileResponse {
  domainId?: string(name='domain_id', description='domain_id', example='domain', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  exist?: boolean(name='exist', description='exist
type: boolean', example=false),
  fileId?: string(name='file_id', description='file_id', example='5d79206586bb5dd69fb34c349282718146c55da7', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  fileName?: string(name='file_name', description='file_name', example='test.txt', maxLength=255, minLength=1),
  location?: string(name='location', description='location'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='[', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  rapidUpload?: boolean(name='rapid_upload', description='rapid_upload
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsUploadInfo?: object(name='streams_upload_info', additionalProperties='{"$ref":"#/definitions/StreamUploadInfo"}', description='streams_upload_info'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
}

/**
 * create_share_link request
 */
model CreateShareLinkRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  description?: string(name='description', description='description', example='desc'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z', format='date-time'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d'),
  fileIdList?: [ string ](name='file_id_list', description='file_id_list', example='5d5b846942cf94fa72324c14a4bda34e81da635d', items='{"type":"string"}', maximum=100, minimum=1),
  filePathList?: [ string ](name='file_path_list', description='file_path_list', example='/a/', items='{"type":"string"}', maximum=100, minimum=1),
  filterGroup?: string(name='filter_group', description='filter_group', example='vip1'),
  referer?: string(name='referer'),
  shareName?: string(name='share_name', description='share_name', example='name'),
  sharePwd?: string(name='share_pwd', description='share_pwd', example='12ABcd', maximum=64, minimum=0),
}

/**
 * create_share_link response
 */
model CreateShareLinkResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z', format='date-time'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='desc'),
  downloadCount?: int64(name='download_count', description='下载次数', example=1, format='int64'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z', format='date-time'),
  expired?: boolean(name='expired', description='expired', example=false),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d'),
  fileIdList?: [ string ](name='file_id_list', description='file_id_list', example='5d5b846942cf94fa72324c14a4bda34e81da635d, file_id_2', items='{"type":"string"}'),
  filePathList?: [ string ](name='file_path_list', description='file_id_list', example='/SD2/, /HD2/', items='{"type":"string"}'),
  previewCount?: int64(name='preview_count', description='preview_count', example=1, format='int64'),
  saveCount?: int64(name='save_count', description='转存次数', example=1, format='int64'),
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
  shareMsg?: string(name='share_msg', description='share_msg', example='复制这条消息并打开app，即可跳转到对应的分享页面'),
  shareName?: string(name='share_name', description='share_name', example='name'),
  sharePolicy?: string(name='share_policy', description='share_policy', enum='url, msg', example='url'),
  sharePwd?: string(name='share_pwd', description='share_pwd', example='12ABcd'),
  shareUrl?: string(name='share_url', description='share_url', example='https://www.aliyundrive.com/sharelinks/index/abcdefghi'),
  status?: string(name='status', description='status', example='xxx'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z', format='date-time'),
}

/**
 * create share request
 */
model CreateShareRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='description', example='share description'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  owner: string(name='owner', description='owner', example='abc'),
  ownerType?: string(name='owner_type', description='owner_type'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFileId?: string(name='share_file_id', description='share_file_id'),
  shareFilePath?: string(name='share_file_path', description='share_file_path'),
  shareName?: string(name='share_name', description='share_name', example='share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', description='share create policy

share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', enum='enabled, disabled', example='enabled'),
}

/**
 * Create share response
 */
model CreateShareResponse {
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * 
 */
model CroppingBoundary {
  height?: int64(name='height', format='int64'),
  left?: int64(name='left', format='int64'),
  top?: int64(name='top', format='int64'),
  width?: int64(name='width', format='int64'),
}

/**
 * 
 */
model CroppingSuggestionItem {
  aspectRatio?: string(name='aspect_ratio'),
  croppingBoundary?: CroppingBoundary(name='cropping_boundary'),
  score?: double(name='score', format='double'),
}

/**
 * 
 */
model CustomBenefitMetaRequest {
  enabled?: boolean(name='enabled'),
}

/**
 * 
 */
model DataBoxPrivileges {
  featureAttrId?: string(name='feature_attr_id', description='feature_attr_id'),
  featureId?: string(name='feature_id', description='feature_id'),
  quota?: int64(name='quota', description='quota', format='int64'),
}

/**
 * 
 */
model DefaultChangePasswordRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  encryptedKey: string(name='encrypted_key', description='AES-256对称加密密钥，通过App公钥加密后传输', example='123456,Abc'),
  newPassword: string(name='new_password', description='新密码，必须包含数字和字母，长度8-20个字符', example='123456,Abc'),
  phoneNumber: string(name='phone_number', description='手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  state: string(name='state', description='修改密码的临时授权码', example='csjanwia'),
}

/**
 * 
 */
model DefaultSetPasswordRequest {
  httpheaders?: map[string]string,
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  encryptedKey: string(name='encrypted_key', description='AES-256对称加密密钥，通过App公钥加密后传输', example='123456,Abc'),
  newPassword: string(name='new_password', description='新密码，必须包含数字和字母，长度8-20个字符，使用AES-256对称加密后传输（CBC模式, 填充算法为PKCS7Padding，生成base64字符串）', example='123456,Abc'),
  state: string(name='state', description='修改密码的临时授权码', example='abc'),
}

/**
 * 
 */
model DeleteAppRequest {
  appId: string(name='app_id', description='App ID', example='CNMrhxwPJHAReExa'),
}

/**
 * 
 */
model DeleteBizCNameAndCertRequest {
  bizCname?: string(name='biz_cname', description='api cname', example='api.yoursite.com'),
  cnameType: string(name='cname_type', description='cname type', example='auth'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='vpc', example=true),
}

/**
 * 
 */
model DeleteBizCNameCertRequest {
  bizCname?: string(name='biz_cname', description='biz cname', example='api.yoursite.com'),
  certId?: string(name='cert_id', description='cert id', example='aa-bb-cc-dd'),
  cnameType: string(name='cname_type', description='cname type', example='auth'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='is vpc', example=false),
}

/**
 * 
 */
model DeleteDataCNameAndCertRequest {
  dataCname: string(name='data_cname', description='cn-shanghai data cname', example='cn-beijing-data.yoursite.com'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  location: string(name='location', description='location', example='cn-beijing'),
}

/**
 * 
 */
model DeleteDetail {
}

/**
 * delete domain request
 */
model DeleteDomainRequest {
  domainId: string(name='domain_id', description='Domain ID', example='sz111'),
}

/**
 * Delete drive request
 */
model DeleteDriveRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  subdomainId?: string(name='subdomain_id', description='Subdomain ID', example='hz-123'),
}

/**
 * delete drive response
 */
model DeleteDriveResponse {
}

/**
 * 删除文件请求
 */
model DeleteFileRequest {
  httpheaders?: map[string]string,
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id'),
  fileIdPath?: string(name='file_id_path'),
  permanently?: boolean(name='permanently', default=false, description='permanently
type: false', example=false),
  shareId?: string(name='share_id'),
}

/**
 * 删除文件 response
 */
model DeleteFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * 删除文件 user_tags 字段
 */
model DeleteFileUserTagsRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  keyList?: [ string ](name='key_list', description='key_list', items='{"type":"string"}'),
}

/**
 * 删除文件 user tags response
 */
model DeleteFileUserTagsResponse {
}

/**
 * 批量删除文件请求
 */
model DeleteFilesRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileIdList: [ string ](name='file_id_list', description='file_id_list', example='', items='{"type":"string"}', maxItems=100),
  shareId?: string(name='share_id', description='share_id'),
}

/**
 * 批量删除文件 response
 */
model DeleteFilesResponse {
  deletedFileIdList?: [ string ](name='deleted_file_id_list', description='deleted_file_id_list', example='', items='{"type":"string"}'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
}

/**
 * delete share request
 */
model DeleteShareRequest {
  httpheaders?: map[string]string,
  shareId: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * 
 */
model DeviceAuthorizeRequest {
  ClientID: string(name='ClientID', description='Client ID, 此处填写创建App时返回的AppID', example='aksjoiajsoias'),
  DeviceInfo?: string(name='DeviceInfo', description='设备信息，用于用户识别设备'),
  DeviceName: string(name='DeviceName', description='设备名，实现方需保证不同设备的设备名不重复（推荐用硬件名称+硬件型号作为设备名）'),
  LoginType?: string(name='LoginType', default='ding', description='鉴权方式，目前支持ding,ram鉴权', example='ding'),
  Scope?: [ string ](name='Scope', description='申请的权限列表, 默认为所有权限', items='{"type":"string"}'),
}

/**
 * domain update name request
 */
model DomainUpdateNameRequest {
  domainId: string(name='domain_id', description='Domain ID', example='sz111'),
  name: string(name='name', description='Domain 名称', example='test_domain'),
}

/**
 * 下载文件请求body
 */
model DownloadRequest {
  DriveID?: string(name='DriveID', description='drive id', example='1'),
  FileID: string(name='FileID', description='file id', example='5d79206586bb5dd69fb34c349282718146c55da7'),
  ImageThumbnailProcess?: string(name='ImageThumbnailProcess', description='in: query
image_thumbnail_process', example='image/resize,m_fill,h_128,w_128,limit_0'),
  OfficeThumbnailProcess?: string(name='OfficeThumbnailProcess', description='office_thumbnail_process', example='image/resize,w_200'),
  ShareID?: string(name='ShareID', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  VideoThumbnailProcess?: string(name='VideoThumbnailProcess', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  fileIdPath?: string(name='file_id_path'),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  referer?: string(name='referer'),
  signToken?: string(name='sign_token'),
}

/**
 * 
 */
model EditDetail {
}

/**
 * 
 */
model FaceThumbnail {
  faceGroupId?: string(name='face_group_id'),
  faceId?: string(name='face_id'),
  faceThumbnail?: string(name='face_thumbnail'),
}

/**
 * 
 */
model FileActivity {
  actors?: [ Actor ](name='actors', description='Actors', example='""', items='{"$ref":"#/definitions/Actor"}'),
  primaryActionDetail?: ActionDetail(name='primary_action_detail'),
  targets?: [ Target ](name='targets', description='Targets', example='""', items='{"$ref":"#/definitions/Target"}'),
  timeRange?: TimeRange(name='time_range'),
  timestamp?: string(name='timestamp', description='Timestamp', example='""'),
}

/**
 * the file op info
 */
model FileDeltaResponse {
  currentCategory?: string(name='current_category'),
  file?: BaseCCPFileResponse(name='file'),
  fileId?: string(name='file_id'),
  op?: string(name='op'),
}

/**
 * 
 */
model FileInfo {
  fileId?: string(name='file_id'),
}

/**
 * 
 */
model FileStreamInfo {
  contentHash?: string(name='content_hash', description='content_hash', example='7C4A8D09CA3762AF61E59520943DC26494F8941B'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentMd5: string(name='content_md5', description='ContentMd5', example='E10ADC3949BA59ABBE56E057F20F883E'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  preHash?: string(name='pre_hash', description='pre_hash', example='E10ADC3949BA59ABBE56E057F20F883E'),
  proofCode?: string(name='proof_code', description='proof_code'),
  proofVersion?: string(name='proof_version', description='proof_version', enum='v1'),
  size: int64(name='size', description='Size', format='int64', minimum=0),
}

/**
 * 
 */
model GetAccessTokenByLinkInfoRequest {
  httpheaders?: map[string]string,
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208333333'),
  type: string(name='type', description='认证类型', example='mobile'),
}

/**
 * 
 */
model GetAppPublicKeyRequest {
  appId: string(name='app_id', description='App ID', example='CNMrhxwPJHAReExa'),
}

/**
 * 
 */
model GetAppRequest {
  appId: string(name='app_id', description='App ID', example='CNMrhxwPJHAReExa'),
}

/**
 * 获取异步人去信息
 */
model GetAsyncTaskRequest {
  httpheaders?: map[string]string,
  asyncTaskId?: string(name='async_task_id', description='async_task_id
type:string', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
}

/**
 * Get AsyncTask Response
 */
model GetAsyncTaskResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id
type:string', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  consumedProcess?: int64(name='consumed_process', description='consumed_process', example=1024000, format='int64'),
  errCode?: int64(name='err_code', description='err_code', example=200, format='int64'),
  message?: string(name='message', description='message', example='task is running'),
  state?: string(name='state', description='state', enum='Running, Failed, Succeed', example='success'),
  totalProcess?: int64(name='total_process', description='total_process', example=4096000, format='int64'),
  url?: string(name='url', description='download_url
example'),
}

/**
 * 
 */
model GetBizCNameInfoRequest {
  cnameType: string(name='cname_type', description='cname type', example='auth'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='is vpc', example=false),
}

/**
 * 
 */
model GetByLinkInfoRequest {
  httpheaders?: map[string]string,
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208333333'),
  type: string(name='type', description='认证类型', example='mobile'),
}

/**
 * 
 */
model GetCaptchaRequest {
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
}

/**
 * 
 */
model GetCorsRuleListRequest {
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
}

/**
 * 
 */
model GetDataCNameInfoRequest {
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
}

/**
 * Get default drive request
 */
model GetDefaultDriveRequest {
  httpheaders?: map[string]string,
  subdomainId?: string(name='subdomain_id', description='Subdomain ID', example='hz-123'),
  userId?: string(name='user_id', description='用户ID', example='abc'),
}

/**
 * 获取文件夹size信息
 */
model GetDirSizeInfoResponse {
  dirCount?: int64(name='dir_count', description='dir_count', example=1000, format='int64'),
  fileCount?: int64(name='file_count', description='file_count', example=100000, format='int64'),
  size?: int64(name='size', description='size', example=1024576, format='int64'),
}

/**
 * get domain request
 */
model GetDomainRequest {
  domainId: string(name='domain_id', description='Domain ID', example='sz111'),
  getBenefit?: boolean(name='get_benefit'),
}

/**
 * 获取文件下载地址的请求body
 */
model GetDownloadUrlRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: int64(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=115200, minimum=1),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  fileName?: string(name='file_name', description='file_name', example='ccp.jpg', maxLength=1024, minLength=1),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
}

/**
 * 获取download url response
 */
model GetDownloadUrlResponse {
  cdnUrl?: string(name='cdn_url', description='cdn_url'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z07:00'),
  internalUrl?: string(name='internal_url', description='internal_url'),
  method?: string(name='method', description='method', example='GET'),
  ratelimit?: RateLimit(name='ratelimit'),
  size?: int64(name='size', description='size', example=102400, format='int64'),
  streamsUrl?: object(name='streams_url', additionalProperties='{"type":"string"}', description='streams url info'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * Get drive request
 */
model GetDriveRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  subdomainId?: string(name='subdomain_id', description='Subdomain ID', example='hz-123'),
}

/**
 * Get drive response
 */
model GetDriveResponse {
  actionList?: [ string ](name='action_list', items='{"type":"string"}'),
  creator?: string(name='creator', description='Drive 创建者', example='ccp'),
  description?: string(name='description', description='Drive 备注信息', example='ccp team drive'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive'),
  driveType?: string(name='drive_type', description='Drive 类型', example='normal'),
  encryptDataAccess?: boolean(name='encrypt_data_access'),
  encryptMode?: string(name='encrypt_mode'),
  owner?: string(name='owner', description='Drive 所有者', example='ccp'),
  ownerType?: string(name='owner_type', description='Drive 所有者类型', example='user'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  relativePath?: string(name='relative_path', description='Drive存储基于store的相对路径，domain的PathType为OSSPath时返回', example='/a/b/e/'),
  status?: string(name='status', description='Drive 状态', example='enabled'),
  storeId?: string(name='store_id', description='存储 ID, domain的PathType为OSSPath时返回', example='123'),
  totalSize?: int64(name='total_size', description='Drive 空间总量', example=102400, format='int64'),
  usedSize?: int64(name='used_size', description='Drive 空间已使用量', example=1024, format='int64'),
}

/**
 * 根据路径获取 File 接口 body
 */
model GetFileByPathRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  referer?: string(name='referer'),
  signToken?: string(name='sign_token'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 根据路径获取文件元数据response
 */
model GetFileByPathResponse {
  actionList?: [ string ](name='action_list', description='action_list', items='{"type":"string"}'),
  autoDeleteLeftSec?: int64(name='auto_delete_left_sec', description='auto_delete_left_sec', example=10000, format='int64'),
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  characteristicHash?: string(name='characteristic_hash', description='CharacteristicHash'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  customField1?: string(name='custom_field_1', description='custom_field_1'),
  customField2?: string(name='custom_field_2', description='custom_field_2'),
  customType?: string(name='custom_type', description='custom_type'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  filePathType?: string(name='file_path_type', description='TODO 先不在API上透出该字段，file_path_type目前在edm中返回；path type是否在PDS通用逻辑中展示，展示的含义是什么，需要再做分析'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  lastModifierId?: string(name='last_modifier_id', description='last_modifier_id', example='123abc'),
  lastModifierName?: string(name='last_modifier_name', description='last_modifier_name', example='test_user'),
  lastModifierType?: string(name='last_modifier_type', description='last_modifier_type', example='User, AliUser'),
  meta?: string(name='meta'),
  mimeExtension?: string(name='mime_extension', description='mime_extension', example='mov'),
  mimeType?: string(name='mime_type', description='mime_type', example='video/quicktime'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  punishFlag?: int64(name='punish_flag', description='PunishFlag', format='int64'),
  shareId?: string(name='share_id'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashed?: boolean(name='trashed', description='Trashed
type: boolean', enum='false, true', example=false),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  userTags?: object(name='user_tags', additionalProperties='{"type":"string"}', description='user_tags'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * 获取文件元数据
 */
model GetFileRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fields?: string(name='fields', default='*', description='fields', example='*'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取文件元数据response
 */
model GetFileResponse {
  actionList?: [ string ](name='action_list', description='action_list', items='{"type":"string"}'),
  autoDeleteLeftSec?: int64(name='auto_delete_left_sec', description='auto_delete_left_sec', example=10000, format='int64'),
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  characteristicHash?: string(name='characteristic_hash', description='CharacteristicHash'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  customField1?: string(name='custom_field_1', description='custom_field_1'),
  customField2?: string(name='custom_field_2', description='custom_field_2'),
  customType?: string(name='custom_type', description='custom_type'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  filePathType?: string(name='file_path_type', description='TODO 先不在API上透出该字段，file_path_type目前在edm中返回；path type是否在PDS通用逻辑中展示，展示的含义是什么，需要再做分析'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  lastModifierId?: string(name='last_modifier_id', description='last_modifier_id', example='123abc'),
  lastModifierName?: string(name='last_modifier_name', description='last_modifier_name', example='test_user'),
  lastModifierType?: string(name='last_modifier_type', description='last_modifier_type', example='User, AliUser'),
  meta?: string(name='meta'),
  mimeExtension?: string(name='mime_extension', description='mime_extension', example='mov'),
  mimeType?: string(name='mime_type', description='mime_type', example='video/quicktime'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  punishFlag?: int64(name='punish_flag', description='PunishFlag', format='int64'),
  shareId?: string(name='share_id'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashed?: boolean(name='trashed', description='Trashed
type: boolean', enum='false, true', example=false),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  userTags?: object(name='user_tags', additionalProperties='{"type":"string"}', description='user_tags'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * 获取最新游标
 */
model GetLastCursorRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
}

/**
 * get last file op cursor response
 */
model GetLastCursorResponse {
  cursor?: string(name='cursor'),
}

/**
 * 
 */
model GetLinkInfoByUserIDRequest {
  httpheaders?: map[string]string,
  userId: string(name='user_id', description='user ID', example='123987123617823'),
}

/**
 * get_media_play_url request
 */
model GetMediaPlayURLRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
}

/**
 * get_media_play_url response
 */
model GetMediaPlayURLResponse {
  url?: string(name='url', description='url', example='https://abc.com/v2/file/play_media?auth_key=xyz&file_id=abc'),
}

/**
 * GetOfficeEditUrlOption 权限控制
 */
model GetOfficeEditUrlOption {
  copy?: boolean(name='copy', description='Copy'),
  readonly?: boolean(name='readonly'),
}

/**
 * 获取office文档在线编辑地址
 */
model GetOfficeEditUrlRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  option?: GetOfficeEditUrlOption(name='option'),
  watermark?: GetOfficeEditUrlWatermark(name='watermark'),
}

/**
 * 获取office文档在线编辑地址 response
 */
model GetOfficeEditUrlResponse {
  editUrl?: string(name='edit_url', description='EditUrl', example='https://office-cn-shanghai.imm.aliyuncs.com/office/w/1023210024677934_a2_3899cdbd16b3061554556d9e949bb2fe85a944030bf147f8de1d79036f5e5a25?hidecmb=1&simple=1&_w_tokentype=1'),
  officeAccessToken?: string(name='office_access_token', description='AccessToken', example='ac80b70a70fe4c34914a12743ac3a6fbv2'),
  officeRefreshToken?: string(name='office_refresh_token', description='RefreshToken', example='ac80b70a70fe4c34914a12743ac3a6fbv2'),
}

/**
 * GetOfficeEditUrlWatermark 水印配置
 */
model GetOfficeEditUrlWatermark {
  fillstyle?: string(name='fillstyle', description='FillStyle'),
  font?: string(name='font', description='Font'),
  horizontal?: int64(name='horizontal', description='Horizontal', format='int64'),
  rotate?: double(name='rotate', description='Rotate', format='double'),
  type?: int32(name='type', description='Type', format='int32'),
  value?: string(name='value', description='Value'),
  vertical?: int64(name='vertical', description='Vertical', format='int64'),
}

/**
 * 获取office文档预览地址
 */
model GetOfficePreviewUrlRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
}

/**
 * 获取文档预览地址 response
 */
model GetOfficePreviewUrlResponse {
  accessToken?: string(name='access_token', description='AccessToken', example='ac80b70a70fe4c34914a12743ac3a6fbv2'),
  previewUrl?: string(name='preview_url', description='preview_url', example='https://office-cn-shanghai.imm.aliyuncs.com/office/w/1023210024677934_a2_3899cdbd16b3061554556d9e949bb2fe85a944030bf147f8de1d79036f5e5a25?hidecmb=1&simple=1&_w_tokentype=1'),
}

/**
 * 
 */
model GetPublicKeyRequest {
  httpheaders?: map[string]string,
  appId?: string(name='app_id', description='App ID', example='CNMrhxwPJHAReExa'),
}

/**
 * 
 */
model GetPublicKeyResponse {
  appId: string(name='app_id', description='App ID', example='cksaljkfiwasdn'),
  keyPairId?: string(name='key_pair_id'),
  publicKey: string(name='public_key', description='RSA加密算法的公钥, PEM格式', example='-----BEGIN RSA PUBLIC KEY-----****-----END RSA PUBLIC KEY-----'),
}

/**
 * 
 */
model GetRPVerifyInfoRequest {
  needIdentityInfo?: boolean(name='need_identity_info', description='Need Identity Info, 是否获取脱敏的身份信息', example=false),
  userId: string(name='user_id', description='User ID, 当前访问的用户', example='"2ef62459eb7a11ea932cacde48001122"'),
}

/**
 * 
 */
model GetRPVerifyResultRequest {
  duringVerifyProcess?: boolean(name='during_verify_process', description='During Verify Process, 是否在实人认证流程中调用', example=true),
  userId: string(name='user_id', description='User ID, 当前访问的用户', example='"2ef62459eb7a11ea932cacde48001122"'),
}

/**
 * 
 */
model GetRPVerifyTokenRequest {
  userId: string(name='user_id', description='User ID, 当前访问的用户', example='"2ef62459eb7a11ea932cacde48001122"'),
}

/**
 * get_share_link_by_anonymous request
 */
model GetShareLinkByAnonymousRequest {
  httpheaders?: map[string]string,
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
}

/**
 * get_share_link_by_anonymous response
 */
model GetShareLinkByAnonymousResponse {
  avatar?: string(name='avatar', description='avatar', example='https://abcd.com/efgh'),
  creatorId?: string(name='creator_id', description='creator_id', example='zhangsan'),
  creatorName?: string(name='creator_name', description='creator_name', example='ABC**FG'),
  creatorPhone?: string(name='creator_phone', description='creator_phone', example='180**32'),
  expiration?: string(name='expiration', description='expiration', example='2019-08-20T06:51:27.292Z'),
  fileCount?: int64(name='file_count', description='file_count', example=3, format='int64'),
  shareName?: string(name='share_name', description='share_name', example='name'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
}

/**
 * 获取分享中文件下载地址的请求body
 */
model GetShareLinkDownloadURLRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  expireSec?: int64(name='expire_sec', default=300, description='expire_sec', example=15, format='int64', maximum=600, minimum=1),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  getAudioPlayInfo?: boolean(name='get_audio_play_info', description='get_audio_play_info', example=true),
  getStreamsUrl?: boolean(name='get_streams_url', description='get_streams_url', example=true),
  getVideoPlayInfo?: boolean(name='get_video_play_info', description='get_video_play_info', example=true),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  referer?: string(name='referer'),
  shareId: string(name='share_id', description='share_id is required', example='Agg1RL8pw96'),
  signToken?: string(name='sign_token'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取分享中文件数据response
 */
model GetShareLinkDownloadURLResponse {
  audioTemplateList?: [ MediaPlayInfoTemplate ](name='audio_template_list', description='audio_template_list', items='{"$ref":"#/definitions/MediaPlayInfoTemplate"}'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  streamsUrl?: object(name='streams_url', additionalProperties='{"type":"string"}', description='streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  videoTemplateList?: [ MediaPlayInfoTemplate ](name='video_template_list', description='video_template_list', items='{"$ref":"#/definitions/MediaPlayInfoTemplate"}'),
}

/**
 * get_share_id request
 */
model GetShareLinkIDRequest {
  httpheaders?: map[string]string,
  shareMsg?: string(name='share_msg', description='share_msg', example='复制这段话¢oJ311MvRD8R¢打開阿里云宝App【来自xxx的分享】'),
}

/**
 * get_share_id response
 */
model GetShareLinkIDResponse {
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
  sharePwd?: string(name='share_pwd', description='share_pwd', example='12ABcd'),
}

/**
 * get_share request
 */
model GetShareLinkRequest {
  httpheaders?: map[string]string,
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
}

/**
 * get_share_token request
 */
model GetShareLinkTokenRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  expireSec?: int64(name='expire_sec', default=7200, description='expire_sec', example=7200, format='int64', maximum=7200, minimum=0),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
  sharePwd?: string(name='share_pwd', description='share_pwd', example='12ABcd'),
}

/**
 * get_share_token response
 */
model GetShareLinkTokenResponse {
  expireTime: string(name='expire_time', description='expire_time', example='2019-09-01T06:57:48.813Z'),
  expiresIn: int64(name='expires_in', description='expires_in', example=3600, format='int64'),
  shareToken: string(name='share_token', description='share_token', example='cnskjajkahwdhwialsnd'),
}

/**
 * get share request
 */
model GetShareRequest {
  httpheaders?: map[string]string,
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * Get share response
 */
model GetShareResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='share description'),
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  expired?: boolean(name='expired', description='expired', example=false),
  owner?: string(name='owner', description='owner', example='xxx'),
  ownerType?: string(name='owner_type', description='owner', example='xxx'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFileId?: string(name='share_file_id', description='share_file_id'),
  shareFilePath?: string(name='share_file_path', description='share_path', example='/a/b/c/'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', example='enabled'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z'),
}

/**
 * 获取文件上传URL
 */
model GetUploadUrlRequest {
  httpheaders?: map[string]string,
  contentMd5?: string(name='content_md5', description='content_md5', example='E10ADC3949BA59ABBE56E057F20F883E', maxLength=32),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='upload_part_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id'),
  uploadId: string(name='upload_id', description='upload_id', example='3920F2BE4D9446D6967E2ED505A97EFD'),
}

/**
 * Get UploadUrl Response
 */
model GetUploadUrlResponse {
  createAt?: string(name='create_at', description='created_at', example='2019-09-11T16:34:36.977Z'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
}

/**
 * 获取视频雪碧图地址的请求body
 */
model GetVideoPreviewSpriteURLRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: int64(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=14400, minimum=1),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
}

/**
 * 获取视频雪碧图地址 url response
 */
model GetVideoPreviewSpriteURLResponse {
  col?: int64(name='col', description='col', example=10, format='int64'),
  count?: int64(name='count', description='count', example=4, format='int64'),
  frameCount?: int64(name='frame_count', description='frame_count', example=450, format='int64'),
  frameHeight?: int64(name='frame_height', description='frame_height', example=90, format='int64'),
  frameWidth?: int64(name='frame_width', description='frame_width', example=160, format='int64'),
  row?: int64(name='row', description='row', example=10, format='int64'),
  spriteUrlList?: [ string ](name='sprite_url_list', description='sprite_url_list', example='[https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt]', items='{"type":"string"}'),
}

/**
 * 获取视频文件播放地址的请求body
 */
model GetVideoPreviewURLRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  audioTemplateId?: string(name='audio_template_id', description='audio_template_id', example='HQ'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: int64(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=14400, minimum=1),
  fileId: string(name='file_id', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
  templateId?: string(name='template_id', description='template_id', example='SD'),
}

/**
 * 获取视频文件播放 url response
 */
model GetVideoPreviewURLResponse {
  previewUrl?: string(name='preview_url', description='preview_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * complete file request
 */
model HostingCompleteFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path'),
  forbidOverwrite?: boolean(name='forbid_overwrite', default=false, description='forbid_overwrite
type: boolean'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id'),
  uploadId?: string(name='upload_id', description='upload_id'),
}

/**
 * complete file response
 */
model HostingCompleteFileResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc?: string(name='crc', description='crc'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * copy file request
 */
model HostingCopyFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', maxLength=1024, minLength=1),
  overwrite?: boolean(name='overwrite', default=false, description='overwrite
type: boolean'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  toDriveId?: string(name='to_drive_id', description='to_drive_id', example='1', pattern='[0-9]+'),
  toParentFilePath: string(name='to_parent_file_path', description='to_parent_file_path', example='/a/b/c/'),
  toShareId?: string(name='to_share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
}

/**
 * 文件拷贝 response
 */
model HostingCopyFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z-]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='drive_id', example='test001', pattern='[a-z0-9A-Z]+'),
}

/**
 * create file request
 */
model HostingCreateFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  contentMd5?: string(name='content_md5', description='ContentMd5', example='E10ADC3949BA59ABBE56E057F20F883E'),
  contentType?: string(name='content_type', description='ContentType', example='application/json'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  forbidOverwrite?: boolean(name='forbid_overwrite', default=false, description='forbid_overwrite
type: boolean'),
  name: string(name='name', description='Name', example='ccp.jpg', maxLength=1024, minLength=1),
  parentFilePath: string(name='parent_file_path', description='parent_file_path'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id', description='share_id', pattern='[0-9a-zA-Z-]+'),
  size?: int64(name='size', description='Size', format='int64', minimum=0),
  type: string(name='type', description='Type', enum='file, folder', example='file'),
}

/**
 * Create file response
 */
model HostingCreateFileResponse {
  domainId?: string(name='domain_id', description='domain_id', example='domain', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='[', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9]+'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
}

/**
 * 删除文件请求
 */
model HostingDeleteFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', maxLength=1000, minLength=1),
  permanently?: boolean(name='permanently', description='permanently
type: false', example=false),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 删除文件 response
 */
model HostingDeleteFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[a-z0-9A-Z]+'),
}

/**
 * 批量删除文件 response
 */
model HostingDeleteFilesResponse {
  deletedFileIdList?: [ string ](name='deleted_file_id_list', description='deleted_file_id_list', example='', items='{"type":"string"}'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9]+'),
}

/**
 * 获取文件下载地址的请求body
 */
model HostingGetDownloadUrlRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: int64(name='expire_sec', default=900, description='expire_sec', example=15, format='int64', maximum=115200, minimum=10),
  fileName?: string(name='file_name', description='file_name', example='ccp.jpg'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg', maxLength=1000, minLength=1),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  signToken?: string(name='sign_token'),
}

/**
 * 获取download url response
 */
model HostingGetDownloadUrlResponse {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z07:00'),
  method?: string(name='method', description='method', example='GET'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * 获取文件元数据
 */
model HostingGetFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_id', maxLength=1000, minLength=1),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  signToken?: string(name='sign_token'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取文件元数据response
 */
model HostingGetFileResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 获取文件安全地址的请求body
 */
model HostingGetSecureUrlRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: int64(name='expire_sec', default=60, description='expire_sec 单位秒', example=60, format='int64'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg', maxLength=1000, minLength=1),
  secureIp?: string(name='secure_ip', description='secure_ip', example='192.168.1.1/24'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 获取secure url response
 */
model HostingGetSecureUrlResponse {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z07:00'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d79219b0aa9a7c995a94a96993ba3205cd91c5a%2F5d79219bf3261a5d38744da0834ed489b677a27a?Expires=xxxOSSAccessKeyId=xxx&Signature=xxx&response-content-disposition=attachment%3Bfilename%3DtBiZAoJPC2c8b13450eda4292b7f5f8010618e078.txt'),
}

/**
 * 获取文件上传URL
 */
model HostingGetUploadUrlRequest {
  contentMd5?: string(name='content_md5', description='content_md5', example='E10ADC3949BA59ABBE56E057F20F883E', maxLength=32),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='upload_part_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9a-zA-Z-]+'),
  uploadId: string(name='upload_id', description='upload_id', example='3920F2BE4D9446D6967E2ED505A97EFD'),
}

/**
 * Get UploadUrl Response
 */
model HostingGetUploadUrlResponse {
  createAt?: string(name='create_at', description='created_at', example='2019-09-11T16:34:36.977Z'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
}

/**
 * list file request
 */
model HostingListFileRequest {
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int64(name='limit', default=50, description='limit', example=10, format='int64', maximum=200, minimum=0),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  parentFilePath: string(name='parent_file_path', description='ParentFilePath', example='/a/b/c.jpg'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id', example='1', pattern='[0-9a-zA-Z-]+'),
  signToken?: string(name='sign_token'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * List file response
 */
model HostingListFileResponse {
  items?: [ BaseHostingFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseHostingFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 列举uploadID对应的已上传分片
 */
model HostingListUploadedPartRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  limit?: int64(name='limit', default=1000, description='limit', example=1, format='int64', maximum=1000, minimum=1),
  partNumberMarker?: int64(name='part_number_marker', description='part_number_marker', example=1, format='int64', minimum=1),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  uploadId?: string(name='upload_id', description='upload_id', example='00668396C0814D818D90F0A92B04B355'),
}

/**
 * 获取签名 response
 */
model HostingListUploadedPartResponse {
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  nextPartNumberMarker?: string(name='next_part_number_marker', description='next_part_number_marker', example='4'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
  uploadedParts?: [ UploadPartInfo ](name='uploaded_parts', description='uploaded_parts', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
}

/**
 * 文件移动请求
 */
model HostingMoveFileRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg'),
  overwrite?: boolean(name='overwrite', default=false, description='overwrite
type: boolean'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  toParentFilePath?: string(name='to_parent_file_path', description='file_path', example='/a/b/c/'),
}

/**
 * 文件移动 response
 */
model HostingMoveFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z-]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath?: string(name='file_path', description='file_path', example='/a/b/c.jpg'),
  shareId?: string(name='share_id', description='drive_id', example='test001', pattern='[a-z0-9A-Z]+'),
}

/**
 * search file response
 */
model HostingSearchFileResponse {
  items?: [ BaseHostingFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseHostingFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 更新文件元数据 response
 */
model HostingUpdateFileMetaResponse {
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='domain_id', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  filePath?: string(name='file_path', description='file_path', example='/a.jpg'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_id', example='/', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[0-9]+'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 获取视频DRM License
 */
model HostingVideoDRMLicenseRequest {
  drmType: string(name='drmType', description='drmType', example='widevine,fairplay'),
  licenseRequest: string(name='licenseRequest', description='licenseRequest', example='xxx'),
}

/**
 * DRM License response
 */
model HostingVideoDRMLicenseResponse {
  data: string(name='data', description='drm_data', example='xxx'),
  deviceInfo: string(name='device_info', description='device_info', example='xxx'),
  states: int64(name='states', description='states', example=0, format='int64'),
}

/**
 * 获取视频分辨率列表
 */
model HostingVideoDefinitionRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.mp4', maxLength=1000, minLength=1),
  protectionScheme?: string(name='protection_scheme', default='none', description='protection_scheme', example='cbcs'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
}

/**
 * 转码接口response
 */
model HostingVideoDefinitionResponse {
  definitionList?: [ string ](name='definition_list', description='definition_list', example='', items='{"type":"string"}'),
  frameRate?: string(name='frame_rate', description='frame_rate', example='30000/1001'),
}

/**
 * 获取视频的m3u8文件
 */
model HostingVideoM3U8Request {
  definition?: string(name='definition', default='Original', description='definition', example='Original'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  expireSec?: int64(name='expire_sec', default=60, description='expire_sec', example=60, format='int64', maximum=86400, minimum=60),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.mp4', maxLength=1000, minLength=1),
  protectionScheme?: string(name='protection_scheme', default='none', description='protection_scheme', example='cbcs'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  signToken: string(name='sign_token', description='sign_token', example='a8swq28ue21has22das213eds'),
}

/**
 * 启动视频转码请求
 */
model HostingVideoTranscodeRequest {
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  filePath: string(name='file_path', description='file_path', example='/a/b/c.mp4', maxLength=1000, minLength=1),
  hlsTime?: int64(name='hls_time', description='hls_time', example=10, format='int64'),
  protectionScheme?: string(name='protection_scheme', default='none', description='protection_scheme', example='cbcs'),
  remarks?: string(name='remarks', description='remarks', example='{"userID":"xxx"}'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6', pattern='[0-9a-zA-Z-]+'),
  transcode?: boolean(name='transcode', default=false, description='transcode', example=true),
}

/**
 * 转码接口response
 */
model HostingVideoTranscodeResponse {
  definitionList?: [ string ](name='definition_list', description='definition_list', example='', items='{"type":"string"}'),
  duration?: int64(name='duration', description='duration', example=100, format='int64'),
  hlsTime?: int64(name='hls_time', description='hls_time', example=10, format='int64'),
}

/**
 * 
 */
model IDPermission {
  ActionList?: [ ActionItem ](name='ActionList', items='{"$ref":"#/definitions/ActionItem"}'),
  CreatedAt?: int64(name='CreatedAt', format='int64'),
  Deleted?: string(name='Deleted'),
  DisinheritSubGroup?: boolean(name='DisinheritSubGroup'),
  DomainID?: string(name='DomainID'),
  ExpireTime?: int64(name='ExpireTime', format='int64'),
  IdentityID?: string(name='IdentityID'),
  IdentityType?: string(name='IdentityType'),
  Resource?: string(name='Resource'),
  ResourceType?: string(name='ResourceType'),
  Roles?: [ string ](name='Roles', items='{"type":"string"}'),
  SequenceNumber?: int64(name='SequenceNumber', format='int64'),
  UpdatedAt?: int64(name='UpdatedAt', format='int64'),
  UpdatedBy?: string(name='UpdatedBy'),
}

/**
 * 
 */
model ImageMediaMetadata {
  height?: int64(name='height', description='height', example=2448, format='int64'),
  takenAt?: string(name='taken_at', description='taken_at', example='Timestamp(format="%Y-%m-%dT%H:%M:%SZ")'),
  width?: int64(name='width', description='width：', example=3264, format='int64'),
}

/**
 * 
 */
model ImageMediaResponse {
  addressLine?: string(name='address_line', description='address_line', example='北京市昌平区白各庄新村路'),
  city?: string(name='city', description='city', example='杭州'),
  country?: string(name='country', description='country', example='中国'),
  croppingSuggestion?: [ CroppingSuggestionItem ](name='cropping_suggestion', description='cropping_suggestion', items='{"$ref":"#/definitions/CroppingSuggestionItem"}'),
  district?: string(name='district', description='district', example='余杭区'),
  exif?: string(name='exif', description='exif json string'),
  faces?: string(name='faces', description='faces json string'),
  facesThumbnail?: [ FaceThumbnail ](name='faces_thumbnail', description='faces_thumbnail_list', items='{"$ref":"#/definitions/FaceThumbnail"}'),
  height?: int64(name='height', default=0, description='height', example=720, format='int64'),
  imageQuality?: ImageQuality(name='image_quality'),
  imageTags?: [ SystemTag ](name='image_tags', description='system_tags', items='{"$ref":"#/definitions/SystemTag"}'),
  location?: string(name='location', description='location', example='40.110333,116.349311'),
  province?: string(name='province', description='province', example='浙江省'),
  time?: string(name='time', description='time', format='date-time'),
  township?: string(name='township', description='township', example='沙河镇'),
  width?: int64(name='width', default=0, description='width', example=1024, format='int64'),
}

/**
 * 
 */
model ImageQuality {
  clarity?: double(name='clarity', format='double'),
  clarityScore?: double(name='clarity_score', format='double'),
  color?: double(name='color', format='double'),
  colorScore?: double(name='color_score', format='double'),
  compositionScore?: double(name='composition_score', format='double'),
  contrast?: double(name='contrast', format='double'),
  contrastScore?: double(name='contrast_score', format='double'),
  exposure?: double(name='exposure', format='double'),
  exposureScore?: double(name='exposure_score', format='double'),
  overallScore?: double(name='overall_score', format='double'),
}

/**
 * 
 */
model LdapConfig {
  adminDn?: string(name='admin_dn'),
  adminPassword?: string(name='admin_password'),
  baseDn?: string(name='base_dn'),
  host?: string(name='host'),
  port?: int64(name='port', format='int64'),
  uid?: string(name='uid'),
}

/**
 * 
 */
model LinkInfo {
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity?: string(name='identity', description='当前用户已存在的登录标识', example='15208345000'),
  type?: string(name='type', description='当前用户已存在的登录方式', example='mobile'),
}

/**
 * 
 */
model LinkInfoListResponse {
  items: [ LinkInfoResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/LinkInfoResponse"}'),
}

/**
 * 
 */
model LinkInfoResponse {
  authenticationType: string(name='authentication_type', description='认证类型', example='mobile'),
  createdAt: int64(name='created_at', description='创建时间', example=1556163159820, format='int64'),
  domainId: string(name='domain_id', description='Domain ID', example='5000'),
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208345000'),
  lastLoginTime: int64(name='last_login_time', description='最后登录时间', example=1556163159820, format='int64'),
  status: string(name='status', description='状态', example='normal'),
  userId: string(name='user_id', description='用户ID', example='00016a587b62b50003deea299a4f5b50'),
}

/**
 * 
 */
model ListAppsRequest {
  limit?: int32(name='limit', default=50, description='返回结果数据', example=100, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='下次查询游标', example='ncsajnsalsa='),
}

/**
 * list_file_by_anonymous request
 */
model ListByAnonymousRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int64(name='limit', description='limit', example=50, format='int64', maximum=100, minimum=1),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  parentFileId: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=4, pattern='[a-z0-9]{1,50}'),
  referer?: string(name='referer'),
  shareId: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
  signToken?: string(name='sign_token'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * list_file_by_anonymous response
 */
model ListByAnonymousResponse {
  items?: [ BaseFileAnonymousResponse ](name='items', description='items', items='{"$ref":"#/definitions/BaseFileAnonymousResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * list domain request
 */
model ListDomainsRequest {
  limit?: int32(name='limit', description='分页大小', example=100, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='查询游标', example='abcd'),
}

/**
 * List drive request
 */
model ListDriveRequest {
  httpheaders?: map[string]string,
  limit?: int32(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记, 接口返回的标记值', example='marker'),
  owner?: string(name='owner', description='所属者', example='abc'),
  ownerType?: string(name='owner_type', description='owner_type
所述者类型', example='user'),
  subdomainId?: string(name='subdomain_id', description='Subdomain ID', example='hz-123'),
}

/**
 * list drive response
 */
model ListDriveResponse {
  items?: [ BaseDriveResponse ](name='items', description='Drive 列表', items='{"$ref":"#/definitions/BaseDriveResponse"}'),
  nextMarker?: string(name='next_marker', description='翻页标记', example='marker'),
}

/**
 * 
 */
model ListFileActivityRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='DriveID', example='"1001"'),
  fileId?: string(name='file_id', description='FileID', example='"6020d97b1e5d179e7d994348b0ee1eb789cfa8d3"'),
  limit?: int32(name='limit', description='Limit, default', format='int32'),
  marker?: string(name='marker', description='Marker'),
}

/**
 * list file activity response
 */
model ListFileActivityResponse {
  activities?: [ FileActivity ](name='activities', description='Activities', items='{"$ref":"#/definitions/FileActivity"}'),
  nextMarker?: string(name='next_marker', description='NextMarker'),
}

/**
 * 列举文件
 */
model ListFileByCustomIndexKeyRequest {
  httpheaders?: map[string]string,
  Starred?: boolean(name='Starred', description='starred', enum='false, true', example=false),
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  category?: string(name='category', description='category', enum='image, video, music, doc, other', example='image'),
  customIndexKey: string(name='custom_index_key', description='custom_index_key'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode'),
  fields?: string(name='fields', description='fields', example='*'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int64(name='limit', default=50, description='limit', example=10, format='int64', maximum=200, minimum=0),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
  status?: string(name='status', default='available', description='status', enum='uploading, available', example='available'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 获取增量文件操作记录
 */
model ListFileDeltaRequest {
  httpheaders?: map[string]string,
  cursor?: string(name='cursor', description='cursor 游标', example='abc'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int32(name='limit', description='limit
default 100', example=100, format='int32'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * list file op response
 */
model ListFileDeltaResponse {
  cursor?: string(name='cursor', description='cursor', example='abc'),
  hasMore?: boolean(name='has_more', description='has_more', example=false),
  items?: [ FileDeltaResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/FileDeltaResponse"}', maxItems=100),
}

/**
 * 列举回收站
 */
model ListFileInRecycleBinRequest {
  httpheaders?: map[string]string,
  Starred?: boolean(name='Starred', description='starred', enum='false, true', example=false),
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  all?: boolean(name='all', default=true, description='all', enum='false, true', example=false),
  category?: string(name='category', description='category', enum='image, video, music, doc, other', example='image'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fields?: string(name='fields', description='fields', example='*'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int64(name='limit', default=50, description='limit', example=10, format='int64', maximum=200, minimum=0),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  orderBy?: string(name='order_by', description='order_by', enum='update_time, name', example='name'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
  parentFileId: string(name='parent_file_id', description='ParentFileID', example='root', maxLength=50, minLength=4, pattern='[a-z0-9.-_]{1,50}'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
  status?: string(name='status', default='available', description='status', enum='uploading, available', example='available'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * ListFileInRecycleBinResponse
 */
model ListFileInRecycleBinResponse {
  items?: [ RecycleBinItemResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/RecycleBinItemResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * 列举文件
 */
model ListFileRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  all?: boolean(name='all', default=true, description='all', enum='false, true', example=false),
  category?: string(name='category', description='category', enum='image, video, music, doc, other', example='image'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fields?: string(name='fields', description='fields', example='*'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int64(name='limit', default=50, description='limit', example=10, format='int64', maximum=200, minimum=0),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  orderBy?: string(name='order_by', description='order_by', enum='update_time, name', example='name'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
  parentFileId: string(name='parent_file_id', description='ParentFileID', example='root', maxLength=50, minLength=4, pattern='[a-z0-9.-_]{1,50}'),
  parentFileIdPath?: string(name='parent_file_id_path'),
  referer?: string(name='referer'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
  signToken?: string(name='sign_token'),
  starred?: boolean(name='starred', description='starred', enum='false, true', example=false),
  status?: string(name='status', default='available', description='status', enum='uploading, available', example='available'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * List file response
 */
model ListFileResponse {
  items?: [ BaseCCPFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseCCPFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * List identity benefit package request
 */
model ListIdentityBenefitPkgRequest {
  benefitIdList?: [ string ](name='benefit_id_list', description='查询特定的benefit ID，include_benefit为true时有效。 如果为空，不做任何过滤；如果不为空，只返回包含特定benefit ID的权益包；也只返回权益包中特定的权益信息。', example='drive_size_list', items='{"type":"string"}'),
  domainId?: string(name='domain_id', description='domain ID AK方式访问，参数identity_type为user时，该项必传', example='sz100'),
  identityType: string(name='identity_type', description='实体类型，目前只支持查询user类型实体绑定的权益包', example='user'),
  includeBenefit?: boolean(name='include_benefit', description='是否返回权益包中的权益，默认为false', example=false),
  includeExpired?: boolean(name='include_expired', description='是否返回已经超期的权益包，默认为false', example=false),
  userId?: string(name='user_id', description='用户 ID, AK方式访问，参数identity_type为user时，该项必传', example='2ef62459'),
}

/**
 * List my drive request
 */
model ListMyDriveRequest {
  httpheaders?: map[string]string,
  limit?: int32(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记, 接口返回的标记值', example='marker'),
}

/**
 * list_share_link request
 */
model ListShareLinkRequest {
  httpheaders?: map[string]string,
  creator?: string(name='creator', description='creator', example='tom'),
  includeCancelled?: boolean(name='include_cancelled', description='include_cancelled', example=true),
  limit?: int32(name='limit', description='limit', example=50, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  orderBy?: string(name='order_by', description='order_by', enum='share_name, description, created_at, updated_at', example='share_name'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
}

/**
 * list_share_link response
 */
model ListShareLinkResponse {
  items?: [ BaseShareLinkResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseShareLinkResponse"}'),
  nextMarker?: string(name='next_marker', description='next_marker'),
}

/**
 * list share request
 */
model ListShareRequest {
  httpheaders?: map[string]string,
  creator?: string(name='creator', description='creator', example='tom'),
  driveId?: string(name='drive_id', example='1', pattern='[0-9]+'),
  limit?: int32(name='limit', description='limit', example=50, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='marker'),
  owner?: string(name='owner', description='Owner', example='jack'),
  ownerType?: string(name='owner_type', description='owner_type', example='group'),
  shareFilePath?: string(name='share_file_path', description='share_file_path', example='/a/b/'),
}

/**
 * List share response
 */
model ListShareResponse {
  items?: [ BaseShareResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseShareResponse"}'),
  nextMarker?: string(name='next_marker', description='next_marker'),
}

/**
 * list store file
 */
model ListStoreFileRequest {
  limit?: int64(name='limit', default=100, description='limit', example=50, format='int64', maximum=1000, minimum=1),
  marker?: string(name='marker', description='marker'),
  parentFilePath?: string(name='parent_file_path', description='parent_file_path'),
  storeId?: string(name='store_id', description='store_id', example='xxx'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
}

/**
 * List storage file
 */
model ListStoreFileResponse {
  items?: [ StoreFile ](name='items', description='items
file list', example='', items='{"$ref":"#/definitions/StoreFile"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * list storage file
 */
model ListStoreRequest {
  domainId?: string(name='domain_id', description='domain_id', example='10'),
}

/**
 * List storage
 */
model ListStoreResponse {
  items?: [ StoreItemResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/StoreItemResponse"}'),
}

/**
 * 
 */
model ListStoresRequest {
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
}

/**
 * 列举uploadID对应的已上传分片
 */
model ListUploadedPartRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  limit?: int64(name='limit', default=1000, description='limit', example=1, format='int64', maximum=1000, minimum=1),
  partNumberMarker?: int64(name='part_number_marker', description='part_number_marker', example=1, format='int64', minimum=1),
  shareId?: string(name='share_id'),
  uploadId?: string(name='upload_id', description='upload_id', example='00668396C0814D818D90F0A92B04B355'),
}

/**
 * 获取签名 response
 */
model ListUploadedPartResponse {
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  nextPartNumberMarker?: string(name='next_part_number_marker', description='next_part_number_marker', example='4'),
  parallelUpload?: boolean(name='parallel_upload'),
  uploadId?: string(name='upload_id', description='upload_id', example='F3C25CDFA5C74ECB8DE32672F6211FD4'),
  uploadedParts?: [ UploadPartInfo ](name='uploaded_parts', description='uploaded_parts', example='', items='{"$ref":"#/definitions/UploadPartInfo"}'),
}

/**
 * 实时转码meta响应
 */
model LiveTranscodingMetaResponse {
  tsPreCount?: int64(name='ts_pre_count', description='ts_pre_count', example=3, format='int64'),
  tsSegment?: int64(name='ts_segment', description='ts_segment', example=10, format='int64'),
  tsTotalCount?: int64(name='ts_total_count', description='ts_total_count', example=11, format='int64'),
}

/**
 * 
 */
model LiveTranscodingSubtitleTaskResponse {
  language?: string(name='language', description='language, 字幕语言', enum='chi, eng', example='chi'),
  status?: string(name='status', description='status', enum='running,  finished', example='finished'),
  url?: string(name='url', description='url, finished 的时候才存在', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 实时转码信息task响应
 */
model LiveTranscodingTaskResponse {
  keepOriginalResolution?: boolean(name='keep_original_resolution', description='keep_original_resolution 转码后的视频分辨率是否保持原画(template分辨率大于当前视频)', example=true),
  previewUrl?: string(name='preview_url', description='preview_url, 视频片段预览播放地址', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  stage?: string(name='stage', description='stage, 实时转码内部状态(Deprecated)', enum='stage_all, stage_pre, stage_none', example='stage_pre'),
  status?: string(name='status', description='status, 转码状态', example='finished'),
  templateId?: string(name='template_id', description='template_id, 转码模板', example='HD'),
  url?: string(name='url', description='url, 视频播放地址', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 
 */
model LoginByCodeRequest {
  accessToken?: string(name='access_token', description='鉴权后返回的accessToken，淘宝登录需要此字段', example='csaklidwasdhjwid'),
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  authCode?: string(name='auth_code', description='鉴权后返回的AuthCode，支付宝登录需要此字段', example='csaklidwasdhjwid'),
  type: string(name='type', description='鉴权类型，淘宝、支付宝', enum='taobao, alipay', example='taobao'),
}

/**
 * 
 */
model LogoutRequest {
  BackUrl?: string(name='BackUrl', description='登出之后的跳转地址，默认跳转到App的域名下', example='https://app.com/home'),
  ClientID: string(name='ClientID', description='Client ID, 此处填写创建App时返回的AppID', example='aksjoiajsoias'),
  LoginType?: string(name='LoginType', description='用户自定义字段，会在鉴权成功后的callback带回'),
}

/**
 * 
 */
model MediaPlayInfoTemplate {
  status?: string(name='status', description='status', enum='finished, failed, running', example='finished'),
  templateId?: string(name='template_id', description='template_id', example='"HD"'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 
 */
model MobileCheckExistRequest {
  httpheaders?: map[string]string,
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
}

/**
 * 
 */
model MobileCheckExistResponse {
  isExist: boolean(name='is_exist', description='当前手机号是否存在', example=true),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
}

/**
 * 
 */
model MobileLoginRequest {
  httpheaders?: map[string]string,
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  autoRegister?: boolean(name='auto_register', default=false, description='是否自动注册用户，使用密码登录此参数不生效', example=false),
  captchaId?: string(name='captcha_id', description='图片验证码ID, 密码登录需要此参数', example='abc'),
  captchaText?: string(name='captcha_text', description='用户输入的验证码值, 密码登录需要此参数', example='abc'),
  encryptedKey?: string(name='encrypted_key', description='AES-256对称加密密钥，通过App公钥加密后传输', example='123456,Abc'),
  nvcParam: string(name='nvc_param', description='环境参数', example='{"a":"CF_APP_1"}'),
  password?: string(name='password', description='登录密码, 传入此参数则忽略短信验证码，不传此参数则默认使用短信登录。', example='123456'),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  smsCode?: string(name='sms_code', description='短信验证码内容，使用密码登录此参数不生效', example='1234'),
  smsCodeId?: string(name='sms_code_id', description='短信验证码ID，使用密码登录此参数不生效', example='csjanwia'),
}

/**
 * 
 */
model MobileRegisterRequest {
  httpheaders?: map[string]string,
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  nvcParam: string(name='nvc_param', description='环境参数', example='{"a":"CF_APP_1"}'),
  phoneNumber: string(name='phone_number', description='待查询的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  smsCode: string(name='sms_code', description='短信验证码内容', example='1234'),
  smsCodeId: string(name='sms_code_id', description='短信验证码ID', example='csjanwia'),
}

/**
 * 
 */
model MobileSendSmsCodeRequest {
  httpheaders?: map[string]string,
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  captchaId?: string(name='captcha_id', description='图片验证码ID', example='abc'),
  captchaText?: string(name='captcha_text', description='用户输入的验证码值', example='abc'),
  nvcParam: string(name='nvc_param', description='环境参数', example='{"a":"CF_APP_1"}'),
  phoneNumber: string(name='phone_number', description='待发送验证短信的手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  type: string(name='type', description='验证码用途, 可下发: login、register、change_password', example='login'),
}

/**
 * 
 */
model MobileSendSmsCodeResponse {
  smsCodeId: string(name='sms_code_id', description='短信验证码ID', example='csjanwia'),
}

/**
 * 
 */
model MoveDetail {
  srcParentFileId?: string(name='src_parent_file_id', description='SrcParentFileID'),
  tgtParentFileId?: string(name='tgt_parent_file_id', description='TgtParentFileID'),
}

/**
 * 文件移动请求
 */
model MoveFileRequest {
  httpheaders?: map[string]string,
  autoRename?: boolean(name='auto_rename'),
  categoryList?: [ string ](name='category_list', items='{"type":"string"}'),
  checkNameMode?: string(name='check_name_mode', default='ignore', description='check_name_mode', enum='ignore, auto_rename, refuse'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  newName?: string(name='new_name', description='new_name', example='ccp.jpg', maxLength=1024, minLength=1),
  shareId?: string(name='share_id'),
  toDriveId?: string(name='to_drive_id', description='to_drive_id', example='1', pattern='[0-9]+'),
  toParentFileId: string(name='to_parent_file_id', description='to_parent_file_id', example='root', maxLength=50, minLength=4),
  toShareId?: string(name='to_share_id', example='1', pattern='[0-9]+'),
}

/**
 * 文件移动 response
 */
model MoveFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id', example='000e89fb-cf8f-11e9-8ab4-b6e980803a3b'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  exist?: boolean(name='exist', description='exist
type: boolean', example=false),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * 
 */
model Permission {
  ActionList?: [ ActionItem ](name='ActionList', items='{"$ref":"#/definitions/ActionItem"}'),
  CreatedAt?: int64(name='CreatedAt', format='int64'),
  Deleted?: string(name='Deleted'),
  DomainID?: string(name='DomainID'),
  IdentityID?: string(name='IdentityID'),
  IdentityType?: string(name='IdentityType'),
  Resource?: string(name='Resource'),
  ResourceType?: string(name='ResourceType'),
  SequenceNumber?: int64(name='SequenceNumber', format='int64'),
  UpdatedAt?: int64(name='UpdatedAt', format='int64'),
  UpdatedBy?: string(name='UpdatedBy'),
}

/**
 * play_media request
 */
model PlayMediaRequest {
  AuthKey: string(name='AuthKey', description='auth_key', example='zzsdfwiskaksfeewasdf001', pattern='[a-z0-9]+'),
  DriveID: string(name='DriveID', description='drive_id', example='1', pattern='[0-9]+'),
  FileID: string(name='FileID', description='file_id', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
}

/**
 * Pre hash check Response
 */
model PreHashCheckSuccessResponse {
  code?: string(name='code', description='code'),
  fileName?: string(name='file_name', description='file_name'),
  message?: string(name='message', description='message'),
  parentFileId: string(name='parent_file_id', description='parent_file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  preHash?: string(name='pre_hash', description='pre_hash'),
}

/**
 * 更新文件 user_tags 字段
 */
model PutFileUserTagsRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  userTags?: [ UserTag ](name='user_tags', description='user_tags', items='{"$ref":"#/definitions/UserTag"}'),
}

/**
 * 更新文件 user tags response
 */
model PutFileUserTagsResponse {
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', pattern='[a-z0-9]{1,50}'),
}

/**
 * 
 */
model RPVerifyBaseRequest {
  userId: string(name='user_id', description='User ID, 当前访问的用户', example='"2ef62459eb7a11ea932cacde48001122"'),
}

/**
 * 
 */
model RPVerifyTokenResponse {
  needRpVerify: boolean(name='need_rp_verify', description='是否需要实人认证，如果用户已通过认证，或者未开启实人认证，返回false', example=false),
  verifyToken: VerifyTokenResponse(name='verify_token'),
}

/**
 * 下载限速配置
 */
model RateLimit {
  partSize?: int64(name='part_size', format='int64'),
  partSpeed?: int64(name='part_speed', format='int64'),
}

/**
 * Recycle bin item response
 */
model RecycleBinItemResponse {
  actionList?: [ string ](name='action_list', description='action_list', items='{"type":"string"}'),
  autoDeleteLeftSec?: int64(name='auto_delete_left_sec', description='auto_delete_left_sec', example=10000, format='int64'),
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  characteristicHash?: string(name='characteristic_hash', description='CharacteristicHash'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  customField1?: string(name='custom_field_1', description='custom_field_1'),
  customField2?: string(name='custom_field_2', description='custom_field_2'),
  customType?: string(name='custom_type', description='custom_type'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  filePathType?: string(name='file_path_type', description='TODO 先不在API上透出该字段，file_path_type目前在edm中返回；path type是否在PDS通用逻辑中展示，展示的含义是什么，需要再做分析'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  lastModifierId?: string(name='last_modifier_id', description='last_modifier_id', example='123abc'),
  lastModifierName?: string(name='last_modifier_name', description='last_modifier_name', example='test_user'),
  lastModifierType?: string(name='last_modifier_type', description='last_modifier_type', example='User, AliUser'),
  meta?: string(name='meta'),
  mimeExtension?: string(name='mime_extension', description='mime_extension', example='mov'),
  mimeType?: string(name='mime_type', description='mime_type', example='video/quicktime'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  punishFlag?: int64(name='punish_flag', description='PunishFlag', format='int64'),
  shareId?: string(name='share_id'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  userTags?: object(name='user_tags', additionalProperties='{"type":"string"}', description='user_tags'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * 刷新office文档在线编辑凭证
 */
model RefreshOfficeEditTokenRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  location?: string(name='location', description='location'),
  officeAccessToken: string(name='office_access_token', description='AccessToken', example='ac80b70a70fe4c34914a12743ac3a6fbv2'),
  officeRefreshToken: string(name='office_refresh_token', description='RefreshToken', example='ac80b70a70fe4c34914a12743ac3a6fbv2'),
}

/**
 * 刷新office文档在线编辑凭证 response
 */
model RefreshOfficeEditTokenResponse {
  officeAccessToken?: string(name='office_access_token', description='AccessToken', example='ac80b70a70fe4c34914a12743ac3a6fbv2'),
  officeRefreshToken?: string(name='office_refresh_token', description='RefreshToken', example='ac80b70a70fe4c34914a12743ac3a6fbv2'),
}

/**
 * 
 */
model RemoveStoreRequest {
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  storeId: string(name='store_id', description='store ID', example='cdjaksbwuiqbxuiassd'),
}

/**
 * 
 */
model RenameDetail {
  newName?: string(name='new_name', description='NewName'),
  oldName?: string(name='old_name', description='OldName'),
}

/**
 * report_event request
 */
model ReportEventRequest {
  httpheaders?: map[string]string,
  eventType?: string(name='event_type', description='event_type', enum='share_link', example='share_link'),
  shareLink?: ReportShareLinkEventRequest(name='share_link'),
}

/**
 * report_event operation response
 */
model ReportEventResponse {
}

/**
 * report_share_link_event request
 */
model ReportShareLinkEventRequest {
  shareId?: string(name='share_id', description='share_id', example='Agg1RL8pw96'),
  subType?: string(name='sub_type', description='sub_type', enum='preview, save, download, report', example='preview'),
}

/**
 * 
 */
model RestoreDetail {
}

/**
 * 恢复文件请求，支持批量
 */
model RestoreFileRequest {
  httpheaders?: map[string]string,
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
}

/**
 * 还原文件response
 */
model RestoreFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id'),
  domainId?: string(name='domain_id', description='domain_id'),
  driveId?: string(name='drive_id', description='drive_id'),
  fileId?: string(name='file_id', description='file_id'),
}

/**
 * 
 */
model RevokeRequest {
  httpheaders?: map[string]string,
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  refreshToken: string(name='refresh_token', description='refresh token, 登录时返回的', example='ybb3WJy2CwXHoM6hBcydGlvzMoJkFpkk'),
}

/**
 * 对应OSS Sha1的结构体，定义在 gitlab.alibaba-inc.com/oss/parallel_hash.go OSSSha1Digest
type OSSSha1Digest struct {
h   [5]uint32         // h是计算sha1时存放中间结果的变量，参与每一轮Sha1的计算，必不可少，最后的Sha1值也由这几个数字决定
x   [BlockSize]byte   // 上一轮计算非64字节对齐时，不足64节的内容会保存在这里
nx  int               // 上一轮计算数据长度取模64的结果，64字节对齐时这个值为0
len uint64            // 到上一个数据块为止的总长度，字节，用来计算 OSSRequestSha1Ctx 中的Nl, Nh
}

SHA1CTX 是 OSSSha1Digest 的简化
当每轮计算Sha1的数据长度为64位对齐时，nx固定为0，x长度为0，只需包含h和len；part_offset对应OSSSha1Digest的len
 */
model SHA1CTX {
  h?: [ integer ](name='h', items='{"format":"int64","type":"integer"}'),
  partOffset?: int64(name='part_offset', format='int64'),
}

/**
 * 全量获取file元信息的请求body
 */
model ScanFileMetaRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  category?: string(name='category', description='category', example='image'),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int32(name='limit', description='limit', example=1000, format='int32', maximum=5000, minimum=1),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * scan file meta response
 */
model ScanFileMetaResponse {
  items?: [ BaseCCPFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseCCPFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * search domain request
 */
model SearchDomainsRequest {
  limit?: int32(name='limit', description='分页大小', example=100, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='查询游标', example='abcd'),
  name?: string(name='name', description='domain名称，模糊匹配', example='xxx'),
  orderBy?: string(name='order_by', description='排序规则', example='created_at'),
}

/**
 * 搜索文件元数据
 */
model SearchFileRequest {
  httpheaders?: map[string]string,
  additionData?: object(name='addition_data', additionalProperties='{"type":"string"}', description='addition_data'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  driveIdList?: [ string ](name='drive_id_list', description='drive_ids', example='1, 2', items='{"type":"string"}'),
  imageCroppingAspectRatios?: [ string ](name='image_cropping_aspect_ratios', example='1:1, 1:2, 2:1, 2:3, 3:2, 7:4', items='{"type":"string"}'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int32(name='limit', default=50, description='limit', example=10, format='int32', maximum=100, minimum=1),
  location?: string(name='location', description='location', example='cn-hangzhou'),
  marker?: string(name='marker', description='Marker', example='""'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  orderBy?: string(name='order_by', default='updated_at', description='order_by', enum='name, created_at, updated_at, size', example='size'),
  query?: string(name='query', description='query', example='not name=123', maxLength=4096),
  referer?: string(name='referer', description='referer'),
  returnTotalCount?: boolean(name='return_total_count', description='return_total_count 是否返回查询总数'),
  signToken?: string(name='sign_token', description='sign_token'),
  urlExpireSec?: int64(name='url_expire_sec', default=900, description='url_expire_sec', example=900, format='int64', maximum=14400, minimum=10),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * search file response
 */
model SearchFileResponse {
  items?: [ BaseCCPFileResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseCCPFileResponse"}', maxItems=100),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
  totalCount?: int64(name='total_count', description='total_count', format='int64'),
}

/**
 * 
 */
model SetAppPublicKeyRequest {
  appId: string(name='app_id', description='App ID', example='CNMrhxwPJHAReExa'),
  publicKey: string(name='public_key', description='RSA加密算法的公钥, PEM格式', example='-----BEGIN RSA PUBLIC KEY-----****-----END RSA PUBLIC KEY-----'),
}

/**
 * 
 */
model SetBizCNameCertRequest {
  CertID?: string(name='CertID'),
  bizCname?: string(name='biz_cname', description='biz cname', example='api.yoursite.com'),
  certBody: string(name='cert_body', description='cert body', example='xxxxxxxxxxx'),
  certName: string(name='cert_name', description='cert name', example='mysite2020cert'),
  certPrivatekey: string(name='cert_privatekey', description='cert privatekey', example='yyyyyyyyyy'),
  cnameType: string(name='cname_type', description='cname type', example='auth'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='biz cname', example=true),
}

/**
 * 
 */
model SetBizCNameRequest {
  bizCname: string(name='biz_cname', description='biz cname', example='api.yoursite.com'),
  cnameType: string(name='cname_type', description='cname type', example='auth'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='biz cname', example=true),
}

/**
 * list cors rule request
 */
model SetCorsRuleListRequest {
  corsRuleList: [ CorsRule ](name='cors_rule_list', description='cors rule list', items='{"$ref":"#/definitions/CorsRule"}'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
}

/**
 * 
 */
model SetDataCNameRequest {
  dataCname: string(name='data_cname', description='cn-shanghai data cname', example='cn-beijing-data.yoursite.com'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  location: string(name='location', description='location', example='cn-beijing'),
}

/**
 * 
 */
model SetShareLinkStatusRequest {
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  enabled: boolean(name='enabled', description='enabled', example=false),
}

/**
 * 
 */
model SetShareStatusRequest {
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  enabled: boolean(name='enabled', description='enabled', example=false),
}

/**
 * 
 */
model SharePermissionPolicy {
  fileId?: string(name='file_id'),
  filePath?: string(name='file_path'),
  permissionInheritable?: boolean(name='permission_inheritable'),
  permissionList?: [ string ](name='permission_list', items='{"type":"string"}'),
  permissionType?: string(name='permission_type'),
}

/**
 * 
 */
model SimpleStreamInfo {
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  size?: int64(name='size', description='size', format='int64'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 
 */
model Store {
  accelerateEndpoint?: string(name='accelerate_endpoint', description='全球加速地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  basePath?: string(name='base_path', description='存储公共前缀', example='pds-data'),
  bucket: string(name='bucket', description='bucket名称', example='data-sz-bucket'),
  cdnEndpoint?: string(name='cdn_endpoint', description='内容分发地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedAccelerateEndpoint?: string(name='customized_accelerate_endpoint', description='自定义全球加速地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedCdnEndpoint?: string(name='customized_cdn_endpoint', description='自定义内容分发地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedEndpoint?: string(name='customized_endpoint', description='自定义Public访问地址', example='https://{regionid}-data.mydomain.com/'),
  customizedInternalEndpoint?: string(name='customized_internal_endpoint', description='自定义vpc访问地址', example='https://{regionid}-data-vpc.mydomain.com/'),
  endpoint: string(name='endpoint', description='Public访问地址', example='https://{domainid}.{regionid}.data.aliyunpds.com/'),
  internalEndpoint?: string(name='internal_endpoint', description='vpc访问地址', example='https://{domainid}.{regionid}.data-vpc.aliyunpds.com/'),
  location?: string(name='location', description='地点', example='cn-hangzhou'),
  ownership: string(name='ownership', description='存储归属，system表示系统提供，custom表示使用自己的存储', enum='system, custom', example='system'),
  policy: string(name='policy', description='Policy授权,system类型store会将bucket权限授予当前云账号'),
  roleArn?: string(name='role_arn', description='访问Bucket的角色ARN', example='acs:oss:*:*:*'),
  storeId: string(name='store_id', description='store ID', example='101'),
  type: string(name='type', description='存储类型，当前只支持oss', enum='oss', example='oss'),
}

/**
 * 
 */
model StoreFile {
  domainId?: string(name='domain_id'),
  name?: string(name='name'),
  parentFilePath?: string(name='parent_file_path'),
  storeId?: string(name='store_id'),
  type?: string(name='type'),
}

/**
 * 
 */
model StoreItemResponse {
  accelerateEndpoint?: string(name='accelerate_endpoint', description='全球加速地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  basePath?: string(name='base_path', description='存储公共前缀', example='pds-data'),
  bucket: string(name='bucket', description='bucket名称', example='data-sz-bucket'),
  cdnEndpoint?: string(name='cdn_endpoint', description='内容分发地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedAccelerateEndpoint?: string(name='customized_accelerate_endpoint', description='自定义全球加速地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedCdnEndpoint?: string(name='customized_cdn_endpoint', description='自定义内容分发地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedEndpoint?: string(name='customized_endpoint', description='自定义Public访问地址', example='https://{regionid}-data.mydomain.com/'),
  customizedInternalEndpoint?: string(name='customized_internal_endpoint', description='自定义vpc访问地址', example='https://{regionid}-data-vpc.mydomain.com/'),
  domainId?: string(name='domain_id'),
  endpoint: string(name='endpoint', description='Public访问地址', example='https://{domainid}.{regionid}.data.aliyunpds.com/'),
  internalEndpoint?: string(name='internal_endpoint', description='vpc访问地址', example='https://{domainid}.{regionid}.data-vpc.aliyunpds.com/'),
  location?: string(name='location', description='地点', example='cn-hangzhou'),
  ownership: string(name='ownership', description='存储归属，system表示系统提供，custom表示使用自己的存储', enum='system, custom', example='system'),
  policy: string(name='policy', description='Policy授权,system类型store会将bucket权限授予当前云账号'),
  roleArn?: string(name='role_arn', description='访问Bucket的角色ARN', example='acs:oss:*:*:*'),
  storeId: string(name='store_id', description='store ID', example='101'),
  type: string(name='type', description='存储类型，当前只支持oss', enum='oss', example='oss'),
}

/**
 * 
 */
model StreamUploadInfo {
  location?: string(name='location', description='location'),
  partInfoList?: [ UploadPartInfo ](name='part_info_list', description='part_info_list', example='[', items='{"$ref":"#/definitions/UploadPartInfo"}'),
  preRapidUpload?: boolean(name='pre_rapid_upload', description='pre_rapid_upload
type: boolean', example=false),
  rapidUpload?: boolean(name='rapid_upload', description='rapid_upload
type: boolean', example=false),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
}

/**
 * 
 */
model SystemTag {
  confidence?: double(name='confidence', format='double'),
  enName?: string(name='en_name'),
  name?: string(name='name'),
  parentEnName?: string(name='parent_en_name'),
  parentName?: string(name='parent_name'),
  source?: string(name='source'),
  tagLevel?: int64(name='tag_level', format='int64'),
}

/**
 * 
 */
model Target {
  fileId?: string(name='file_id', description='FileID', example='""'),
  fileName?: string(name='file_name', description='FileName', example='""'),
  fileType?: string(name='file_type', description='FileType', example='""'),
}

/**
 * 
 */
model TimeRange {
  endTime?: string(name='end_time', description='EndTime', example='""'),
  startTime?: string(name='start_time', description='StartTime', example='""'),
}

/**
 * 
 */
model TokenRequest {
  Assertion?: string(name='Assertion', description='JWT方式授权需要传此参数，传入JWT签名的声明，用于更换accessToken', example='ak******asd=='),
  ClientID: string(name='ClientID', description='Client ID, 此处填写创建App时返回的AppID', example='aksjoiajsoias'),
  ClientSecret: string(name='ClientSecret', description='Client ID, 此处填写创建App时返回的AppSecret', example='alsdklajdkxlawalwknq'),
  Code?: string(name='Code', description='认证后回调参数中的code', example='cjajksadhw'),
  DeviceCode?: string(name='DeviceCode', description='OAuth2.0 device flow换取token参数', example='cjajksadhw'),
  GrantType: string(name='GrantType', description='通过code获取accessToken或者通过refresh_token获取accessToken', enum='refresh_token, authorization_code', example='authorization_code'),
  RedirectUri?: string(name='RedirectUri', description='回调地址, 此处填写创建App时填写的回调地址，OAuth方式登录时需要传入', example='https://app.com/callback'),
  RefreshToken?: string(name='RefreshToken', description='刷新accessToken使用的refreshToken', example='aksbcjhwhq'),
  SubDomainID?: string(name='SubDomainID', description='SubDomainID', example='null'),
}

/**
 * 
 */
model TrashDetail {
  parentFileId?: string(name='parent_file_id', description='ParentFileID'),
}

/**
 * 删除文件请求，支持批量
 */
model TrashFileRequest {
  httpheaders?: map[string]string,
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  shareId?: string(name='share_id', description='share_id, either share_id or drive_id is required', example='0018d25b-faed-4f5c-a67b-414e160b7953'),
}

/**
 * 删除文件到回收站response
 */
model TrashFileResponse {
  asyncTaskId?: string(name='async_task_id', description='async_task_id'),
  domainId?: string(name='domain_id', description='domain_id'),
  driveId?: string(name='drive_id', description='drive_id'),
  fileId?: string(name='file_id', description='file_id'),
}

/**
 * UCGetObjectInfoByObjectKeyRequest
 */
model UCGetObjectInfoByObjectKeyRequest {
  objectKey?: string(name='object_key'),
}

/**
 * UCGetObjectInfoBySha1Request
 */
model UCGetObjectInfoBySha1Request {
  sha1?: string(name='sha1'),
}

/**
 * 
 */
model UnionAuthentication {
  AuthenticationType?: string(name='AuthenticationType'),
  CreatedAt?: int64(name='CreatedAt', format='int64'),
  Extra?: string(name='Extra'),
  Identity?: string(name='Identity'),
  Status?: string(name='Status'),
  UnionID?: string(name='UnionID'),
}

/**
 * 
 */
model UnionDomainUserBind {
  AuthenticationType?: string(name='AuthenticationType'),
  DomainID?: string(name='DomainID'),
  Extra?: string(name='Extra'),
  Identity?: string(name='Identity'),
  UnionID?: string(name='UnionID'),
  UserID?: string(name='UserID'),
}

/**
 * 
 */
model UpdateAppRequest {
  appId: string(name='app_id', description='App ID', example='CNMrhxwPJHAReExa'),
  appName?: string(name='app_name', description='App名称', example='图片分享应用', maxLength=128, minLength=1),
  description?: string(name='description', description='App描述', example='测试专用', maxLength=1024, minLength=0),
  logo?: string(name='logo', description='App图标', example='https://app.com/logo.jpg'),
  redirectUri?: string(name='redirect_uri', description='App回调地址', example='https://app.com/callback'),
  scope?: [ string ](name='scope', description='App权限列表', enum='FILE.ALL, SHARE.ALL, STORAGEFILE.ALL, STORAGE.ALL, DRIVE.ALL, USER.ALL', items='{"type":"string"}'),
  type?: string(name='type', default='WebServer', description='App类型', enum='WebServer, WebBrowser, Native, JWT', example='WebServer'),
}

/**
 * update domain request
 */
model UpdateDomainRequest {
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='启用钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='启用 RAM 认证', example=true),
  customBenefits?: object(name='custom_benefits', additionalProperties='{"$ref":"#/definitions/CustomBenefitMetaRequest"}'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 名称', example='test_domain'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  getBenefit?: boolean(name='get_benefit'),
  initDriveEnable?: boolean(name='init_drive_enable', description='开启自动初始化 Drive', example=true),
  initDriveSize?: int64(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 使用 Store ID', example='1'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  sharable?: boolean(name='sharable', description='开启分享', example=true),
}

/**
 * Update drive request
 */
model UpdateDriveRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='描述信息', example='ccp team drive', maxLength=1024),
  driveId: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive', maxLength=1024),
  encryptDataAccess?: boolean(name='encrypt_data_access', default=false, description='授权访问加密数据', example=true),
  encryptMode?: string(name='encrypt_mode', description='加密模式', example='server'),
  status?: string(name='status', default='enabled', description='状态', enum='disabled, enabled', example='enabled'),
  subdomainId?: string(name='subdomain_id', description='Subdomain ID', example='hz-123'),
  totalSize?: int64(name='total_size', default=0, description='总大小,单位Byte [如果设置 -1 代表不限制]', example=1024, format='int64'),
}

/**
 * Update drive response
 */
model UpdateDriveResponse {
  actionList?: [ string ](name='action_list', items='{"type":"string"}'),
  creator?: string(name='creator', description='Drive 创建者', example='ccp'),
  description?: string(name='description', description='Drive 备注信息', example='ccp team drive'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  driveId?: string(name='drive_id', description='Drive ID', example='123'),
  driveName?: string(name='drive_name', description='Drive 名称', example='ccpdrive'),
  driveType?: string(name='drive_type', description='Drive 类型', example='normal'),
  encryptDataAccess?: boolean(name='encrypt_data_access'),
  encryptMode?: string(name='encrypt_mode'),
  owner?: string(name='owner', description='Drive 所有者', example='ccp'),
  ownerType?: string(name='owner_type', description='Drive 所有者类型', example='user'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  relativePath?: string(name='relative_path', description='Drive存储基于store的相对路径，domain的PathType为OSSPath时返回', example='/a/b/e/'),
  status?: string(name='status', description='Drive 状态', example='enabled'),
  storeId?: string(name='store_id', description='存储 ID, domain的PathType为OSSPath时返回', example='123'),
  totalSize?: int64(name='total_size', description='Drive 空间总量', example=102400, format='int64'),
  usedSize?: int64(name='used_size', description='Drive 空间已使用量', example=1024, format='int64'),
}

/**
 * 更新文件元数据
 */
model UpdateFileMetaRequest {
  httpheaders?: map[string]string,
  checkNameMode?: string(name='check_name_mode', default='ignore', description='check_name_mode', enum='ignore, auto_rename, refuse'),
  customField1?: string(name='custom_field_1'),
  customField2?: string(name='custom_field_2'),
  customIndexKey?: string(name='custom_index_key'),
  customType?: string(name='custom_type'),
  description?: string(name='description', description='description
type: string', example='description', maxLength=1024),
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode'),
  fileId: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9.-_]{1,50}'),
  fileIdPath?: string(name='file_id_path'),
  hidden?: boolean(name='hidden', default=false, description='hidden
type: boolean', example=false),
  labels?: [ string ](name='labels', description='labels', example='label1, label2', items='{"type":"string"}'),
  meta?: string(name='meta'),
  name?: string(name='name', description='name', example='ccp.jpg', maxLength=1024, minLength=1),
  referer?: string(name='referer'),
  shareId?: string(name='share_id'),
  signToken?: string(name='sign_token'),
  starred?: boolean(name='starred', default=false, description='starred
type: boolean', example=false),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
}

/**
 * 更新文件元数据 response
 */
model UpdateFileMetaResponse {
  actionList?: [ string ](name='action_list', description='action_list', items='{"type":"string"}'),
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  characteristicHash?: string(name='characteristic_hash', description='CharacteristicHash'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  customField1?: string(name='custom_field_1', description='custom_field_1'),
  customField2?: string(name='custom_field_2', description='custom_field_2'),
  customType?: string(name='custom_type', description='custom_type'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  lastModifierId?: string(name='last_modifier_id', description='last_modifier_id', example='123abc'),
  lastModifierName?: string(name='last_modifier_name', description='last_modifier_name', example='test_user'),
  lastModifierType?: string(name='last_modifier_type', description='last_modifier_type', example='User, AliUser'),
  meta?: string(name='meta'),
  mimeExtension?: string(name='mime_extension', description='mime_extension', example='mov'),
  mimeType?: string(name='mime_type', description='mime_type', example='video/quicktime'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  punishFlag?: int64(name='punish_flag', description='PunishFlag', format='int64'),
  shareId?: string(name='share_id'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  userTags?: object(name='user_tags', additionalProperties='{"type":"string"}', description='user_tags'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
}

/**
 * update_share_link request
 */
model UpdateShareLinkRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='description', example='desc'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z', format='date-time'),
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
  shareName?: string(name='share_name', description='share_name', example='name'),
  sharePwd?: string(name='share_pwd', description='share_pwd', example='12ABcd', maximum=64, minimum=0),
  status?: string(name='status', description='status', example='enabled'),
}

/**
 * update_share_link response
 */
model UpdateShareLinkResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z', format='date-time'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='desc'),
  downloadCount?: int64(name='download_count', description='下载次数', example=1, format='int64'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z', format='date-time'),
  expired?: boolean(name='expired', description='expired', example=false),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d'),
  fileIdList?: [ string ](name='file_id_list', description='file_id_list', example='5d5b846942cf94fa72324c14a4bda34e81da635d, file_id_2', items='{"type":"string"}'),
  filePathList?: [ string ](name='file_path_list', description='file_id_list', example='/SD2/, /HD2/', items='{"type":"string"}'),
  previewCount?: int64(name='preview_count', description='preview_count', example=1, format='int64'),
  saveCount?: int64(name='save_count', description='转存次数', example=1, format='int64'),
  shareId?: string(name='share_id', description='share_id', example='z6e81Up4u3GDBoJ741dm8z8fZBc2dh8gW'),
  shareMsg?: string(name='share_msg', description='share_msg', example='复制这条消息并打开app，即可跳转到对应的分享页面'),
  shareName?: string(name='share_name', description='share_name', example='name'),
  sharePolicy?: string(name='share_policy', description='share_policy', enum='url, msg', example='url'),
  sharePwd?: string(name='share_pwd', description='share_pwd', example='12ABcd'),
  shareUrl?: string(name='share_url', description='share_url', example='https://www.aliyundrive.com/sharelinks/index/abcdefghi'),
  status?: string(name='status', description='status', example='xxx'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z', format='date-time'),
}

/**
 * update share request
 */
model UpdateShareRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='description', example='share description', maxLength=1024),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareId: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share_name'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', description='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', enum='enabled, disabled', example='enabled'),
}

/**
 * Update share response
 */
model UpdateShareResponse {
  createdAt?: string(name='created_at', description='created_at', example='2006-01-02T15:04:05.999Z'),
  creator?: string(name='creator', description='creator', example='xxx'),
  description?: string(name='description', description='description', example='share description'),
  domainId?: string(name='domain_id', description='domain_id', example='domain-1'),
  driveId?: string(name='drive_id', description='drive_id', example='1'),
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  expired?: boolean(name='expired', description='expired', example=false),
  owner?: string(name='owner', description='owner', example='xxx'),
  ownerType?: string(name='owner_type', description='owner', example='xxx'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  shareFileId?: string(name='share_file_id', description='share_file_id'),
  shareFilePath?: string(name='share_file_path', description='share_path', example='/a/b/c/'),
  shareId?: string(name='share_id', description='share_id', example='3d336314-63c8-4d96-bce0-17aefb6833b6'),
  shareName?: string(name='share_name', description='share_name', example='new_share'),
  sharePolicy?: [ SharePermissionPolicy ](name='share_policy', items='{"$ref":"#/definitions/SharePermissionPolicy"}'),
  status?: string(name='status', description='status', example='enabled'),
  updatedAt?: string(name='updated_at', description='updated_at', example='2006-01-02T15:04:05.999Z'),
}

/**
 * 
 */
model UploadPartInfo {
  contentType?: string(name='content_type', description='content_type'),
  etag?: string(name='etag', description='etag', example='0CC175B9C0F1B6A831C399E269772661'),
  internalUploadUrl?: string(name='internal_upload_url', description='internal_upload_url', example='https://ccp.data-vpc.aliyuncs.com/xxx/xxx?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx&partNumber=1&uploadId=0CC175B9C0F1B6A831C399E269772661'),
  parallelSha1Ctx?: SHA1CTX(name='parallel_sha1_ctx'),
  partNumber?: int64(name='part_number', description='PartNumber', example=1, format='int64', maximum=10000, minimum=1),
  partSize?: int64(name='part_size', description='PartSize：', example=1024, format='int64', maximum=5368709120),
  uploadUrl?: string(name='upload_url', description='upload_url', example='https://ccp.data.aliyuncs.com/xxx/xxx?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx&partNumber=1&uploadId=0CC175B9C0F1B6A831C399E269772661'),
}

/**
 * 
 */
model UrlInfo {
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
}

/**
 * 
 */
model UserAuthentication {
  AuthenticationType: string(name='AuthenticationType', description='认证类型', example='mobile'),
  CreatedAt: int64(name='CreatedAt', description='创建时间', example=1556163159820, format='int64'),
  Detail: string(name='Detail', description='详情', example='{name:abc}'),
  DomainID: string(name='DomainID', description='Domain ID', example='5000'),
  Identity: string(name='Identity', description='唯一身份标识', example='15208345000'),
  LastLoginTime: int64(name='LastLoginTime', description='最后登录时间', example=1556163159820, format='int64'),
  Status: string(name='Status', description='状态', example='normal'),
  UserID: string(name='UserID', description='用户ID', example='00016a587b62b50003deea299a4f5b50'),
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  subdomainId?: string(name='subdomain_id', description='subdomain id'),
}

/**
 * 
 */
model UserTag {
  key?: string(name='key', description='key', example='123abc'),
  value?: string(name='value', description='value', example='abcdef'),
}

/**
 * 
 */
model VerifyCodeRequest {
  httpheaders?: map[string]string,
  appId: string(name='app_id', description='App ID, 当前访问的App', example='csaklidwasdhjwid'),
  phoneNumber: string(name='phone_number', description='手机号', example='152*****341'),
  phoneRegion?: string(name='phone_region', description='国家编号，默认86，不需要填+号，直接填数字', example='86'),
  smsCode: string(name='sms_code', description='短信验证码内容', example='1234'),
  smsCodeId: string(name='sms_code_id', description='短信验证码ID', example='csjanwia'),
  verifyType?: string(name='verify_type', description='需要被校验内容的类型', example='password'),
}

/**
 * 
 */
model VerifyCodeResponse {
  state: string(name='state', description='修改密码的临时授权码', example='csjanwia'),
}

/**
 * 
 */
model VerifyTokenResponse {
  token: string(name='token', description='实人认证的Token', example='"a5**d4"'),
  ttl: int64(name='ttl', description='实人认证token有效秒数，如1800', example=1800, format='int64'),
  url: string(name='url', description='实人认证的URL，包含Token', example='"http://domain/router/?key=value&token=token_value"'),
}

/**
 * 
 */
model VideoMediaAudioStream {
  bitRate?: string(name='bit_rate', description='bit_rate 音频比特率 单位：bps', example='"129280"'),
  channelLayout?: string(name='channel_layout', description='channel_layout 声道布局', example='"5.1", "stereo"'),
  channels?: int64(name='channels', description='channels 音频数/声道数', example=2, format='int64'),
  codeName?: string(name='code_name', description='code_name 音频编码模式', example='"aac"'),
  duration?: string(name='duration', description='duration 单位 秒', example='"7704.573000"'),
  sampleRate?: string(name='sample_rate', description='sample_rate 音频采样率', example='"48000"'),
}

/**
 * 
 */
model VideoMediaMetadata {
  duration?: string(name='duration', description='Duration', example='"10.111"'),
  takenAt?: string(name='taken_at', description='taken_at', example='Timestamp(format="%Y-%m-%dT%H:%M:%SZ")'),
}

/**
 * 
 */
model VideoMediaResponse {
  addressLine?: string(name='address_line', description='address_line', example='北京市昌平区白各庄新村路'),
  city?: string(name='city', description='city', example='杭州'),
  country?: string(name='country', description='country', example='中国'),
  district?: string(name='district', description='district', example='余杭区'),
  duration?: string(name='duration', description='duration 单位 秒', example='"7704.573000"'),
  height?: int64(name='height', default=0, description='height', example=720, format='int64'),
  imageTags?: [ SystemTag ](name='image_tags', description='system_tags', items='{"$ref":"#/definitions/SystemTag"}'),
  location?: string(name='location', description='location', example='40.110333,116.349311'),
  province?: string(name='province', description='province', example='浙江省'),
  time?: string(name='time', description='time', format='date-time'),
  township?: string(name='township', description='township', example='沙河镇'),
  videoMediaAudioStream?: [ VideoMediaAudioStream ](name='video_media_audio_stream', items='{"$ref":"#/definitions/VideoMediaAudioStream"}'),
  videoMediaVideoStream?: [ VideoMediaVideoStream ](name='video_media_video_stream', items='{"$ref":"#/definitions/VideoMediaVideoStream"}'),
  width?: int64(name='width', default=0, description='width', example=1024, format='int64'),
}

/**
 * 
 */
model VideoMediaVideoStream {
  bitrate?: string(name='bitrate', description='bitrate 视频比特率 单位：bps', example='"108420"'),
  clarity?: string(name='clarity', description='clarity 清晰度（扫描）', example='"1080P"'),
  codeName?: string(name='code_name', description='code_name 视频编码模式', example='"h264"'),
  duration?: string(name='duration', description='duration 单位 秒', example='"7704.573000"'),
  fps?: string(name='fps', description='fps 视频平均帧率', example='"25/1"'),
  rotate?: string(name='rotate', description='rotate 视频横屏 竖屏'),
}

/**
 * 
 */
model VideoPreviewAudioMeta {
  bitrate?: double(name='bitrate', description='bitrate', example=349461, format='double'),
  channels?: int64(name='channels', description='channels', example=2, format='int64'),
  duration?: double(name='duration', description='duration', example=18.2, format='double'),
  sampleRate?: double(name='sample_rate', description='sample_rate', example=18.2, format='double'),
}

/**
 * 
 */
model VideoPreviewAudioMusicMeta {
  album?: string(name='album', description='album', example='"范特西"'),
  artist?: string(name='artist', description='artist', example='"周杰伦"'),
  coverUrl?: string(name='cover_url', description='cover_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  title?: string(name='title', description='title', example='"爱在西元前"'),
}

/**
 * 获取转码信息meta响应
 */
model VideoPreviewPlayInfoMetaResponse {
  duration?: double(name='duration', description='duration, 视频长度', example=123, format='double'),
  height?: int64(name='height', description='height, 视频高度', example=720, format='int64'),
  liveTranscodingMeta?: LiveTranscodingMetaResponse(name='live_transcoding_meta'),
  width?: int64(name='width', description='width, 视频宽度', example=1280, format='int64'),
}

/**
 * 转码信息响应
 */
model VideoPreviewPlayInfoResponse {
  category?: string(name='category', description='category', enum='live_transcoding', example='live_transcoding'),
  liveTranscodingSubtitleTaskList?: [ LiveTranscodingSubtitleTaskResponse ](name='live_transcoding_subtitle_task_list', items='{"$ref":"#/definitions/LiveTranscodingSubtitleTaskResponse"}'),
  liveTranscodingTaskList?: [ LiveTranscodingTaskResponse ](name='live_transcoding_task_list', items='{"$ref":"#/definitions/LiveTranscodingTaskResponse"}'),
  meta?: VideoPreviewPlayInfoMetaResponse(name='meta'),
}

/**
 * 
 */
model VideoPreviewResponse {
  audioChannels?: int64(name='audio_channels', description='audio_channels', example=2, format='int64'),
  audioFormat?: string(name='audio_format', description='audio_format', example='"AAC"'),
  audioMeta?: VideoPreviewAudioMeta(name='audio_meta'),
  audioMusicMeta?: VideoPreviewAudioMusicMeta(name='audio_music_meta'),
  audioSampleRate?: string(name='audio_sample_rate', description='audio_sample_rate', example='"44100"'),
  audioTemplateList?: [ VideoPreviewTranscode ](name='audio_template_list', description='audio_template_list', items='{"$ref":"#/definitions/VideoPreviewTranscode"}'),
  bitrate?: string(name='bitrate', description='bitrate', example='"39101896"'),
  duration?: string(name='duration', description='duration', example='"8053"'),
  frameRate?: string(name='frame_rate', description='frame_rate', example='"239.877"'),
  height?: int64(name='height', description='height', example=1280, format='int64'),
  spriteInfo?: VideoPreviewSpriteResponse(name='sprite_info'),
  templateList?: [ VideoPreviewTranscode ](name='template_list', description='template_list', items='{"$ref":"#/definitions/VideoPreviewTranscode"}'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  videoFormat?: string(name='video_format', description='video_format', example='"H264"'),
  width?: int64(name='width', description='width', example=720, format='int64'),
}

/**
 * 
 */
model VideoPreviewSpriteResponse {
  col?: int64(name='col', description='col', example=10, format='int64'),
  count?: int64(name='count', description='count', example=4, format='int64'),
  frameCount?: int64(name='frame_count', description='frame_count', example=333, format='int64'),
  frameHeight?: int64(name='frame_height', description='frame_height', example=90, format='int64'),
  frameWidth?: int64(name='frame_width', description='frame_width', example=160, format='int64'),
  row?: int64(name='row', description='row', example=10, format='int64'),
  status?: string(name='status', description='status', example='finished'),
}

/**
 * 
 */
model VideoPreviewTranscode {
  status?: string(name='status', description='status', example='finished'),
  templateId?: string(name='template_id', description='template_id', example='"Original"'),
}

/**
 * 
 */
model AddStoreResponse {
  accelerateEndpoint?: string(name='accelerate_endpoint', description='全球加速地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  basePath?: string(name='base_path', description='存储公共前缀', example='pds-data'),
  bucket: string(name='bucket', description='bucket名称', example='data-sz-bucket'),
  cdnEndpoint?: string(name='cdn_endpoint', description='内容分发地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedAccelerateEndpoint?: string(name='customized_accelerate_endpoint', description='自定义全球加速地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedCdnEndpoint?: string(name='customized_cdn_endpoint', description='自定义内容分发地址', example='https://oss-cn-shenzhen.aliyuncs.com/'),
  customizedEndpoint?: string(name='customized_endpoint', description='自定义Public访问地址', example='https://{regionid}-data.mydomain.com/'),
  customizedInternalEndpoint?: string(name='customized_internal_endpoint', description='自定义vpc访问地址', example='https://{regionid}-data-vpc.mydomain.com/'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  endpoint: string(name='endpoint', description='Public访问地址', example='https://{domainid}.{regionid}.data.aliyunpds.com/'),
  internalEndpoint?: string(name='internal_endpoint', description='vpc访问地址', example='https://{domainid}.{regionid}.data-vpc.aliyunpds.com/'),
  location?: string(name='location', description='地点', example='cn-hangzhou'),
  ownership: string(name='ownership', description='存储归属，system表示系统提供，custom表示使用自己的存储', enum='system, custom', example='system'),
  policy: string(name='policy', description='Policy授权,system类型store会将bucket权限授予当前云账号'),
  roleArn?: string(name='role_arn', description='访问Bucket的角色ARN', example='acs:oss:*:*:*'),
  storeId: string(name='store_id', description='store ID', example='101'),
  type: string(name='type', description='存储类型，当前只支持oss', enum='oss', example='oss'),
}

/**
 * 
 */
model AdminListStoresRequest {
  httpheaders?: map[string]string,
}

/**
 * 
 */
model AppConfig {
  hideDriveFileEntry?: boolean(name='hide_drive_file_entry'),
  hideShareAdminEntry?: boolean(name='hide_share_admin_entry'),
  webVersion?: string(name='web_version'),
}

/**
 * 
 */
model AssignRoleSettingDetail {
  manageResourceId?: string(name='manage_resource_id', description='manage_resource_id', example='a123'),
  manageResourceName?: string(name='manage_resource_name', description='manage_resource_name', example='user_name_123'),
  manageResourceType?: string(name='manage_resource_type', description='manage_resource_type', example='user'),
  roleId?: string(name='role_id', description='role_id', example='SystemBaseSettingAdmin'),
}

/**
 * 
 */
model AuditLogConfig {
  activeLogKeepDays?: int64(name='active_log_keep_days', format='int64'),
  enabled?: boolean(name='enabled'),
  redirectEnabled?: boolean(name='redirect_enabled'),
}

/**
 * 
 */
model BaseAuditLogRequest {
  orderBy?: string(name='order_by', description='order_by', enum='acted_at DESC', example='name'),
  query?: string(name='query', description='query', example='not actor_name=user1', maxLength=4096),
}

/**
 * 
 */
model BaseAuditLogResponse {
  ClientDevice?: string(name='ClientDevice', description='客户端设备', example='"Chrome"'),
  ClientIP?: string(name='ClientIP', description='客户端IP', example='"123.132.213.231"'),
  ClientType?: string(name='ClientType', description='客户端类型', example='"Web"'),
  ClientVersion?: string(name='ClientVersion', description='客户端版本', example='"v1.0.0"'),
  actedAt?: string(name='acted_at', description='操作时间', example='"2021-02-05T06:07:05.181Z"'),
  actionCategory?: string(name='action_category', description='操作分类', example='1'),
  actionType?: string(name='action_type', description='操作类型', example='12'),
  actorId?: string(name='actor_id', description='操作者ID', example='"20000000ed6249fd8457ed6970000000"'),
  actorName?: string(name='actor_name', description='操作者名称', example='"user1"'),
  actorType?: string(name='actor_type', description='操作者类型', example='"User"'),
  detail?: LogDetail(name='detail'),
  filePathType?: string(name='file_path_type', description='文件空间类型', example='"self"'),
  logId?: string(name='log_id', description='唯一标识一条日志', example='"10000000ed6249fd8457ed6970000000"'),
  objectId?: string(name='object_id', description='对象ID', example='30000000ed6249fd8457ed6970000000'),
  objectName?: string(name='object_name', description='对象名', example='"设计组"'),
}

/**
 * base domain response
 */
model BaseDomainResponse {
  apiCname?: string(name='api_cname', description='Domain APICName', example='"pdsapi.yoursite.com"'),
  appCname?: string(name='app_cname', description='Domain AppCName', example='"pdsapp.yoursite.com"'),
  appConfig?: AppConfig(name='app_config'),
  auditLogConfig?: AuditLogConfig(name='audit_log_config'),
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authCname?: string(name='auth_cname', description='Domain AuthCName', example='"pdsauth.yoursite.com"'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  benefits?: object(name='benefits', additionalProperties='{"$ref":"#/definitions/BenefitMetaResponse"}'),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  defaultSuperAdminConfig?: DomainSuperAdminConfig(name='default_super_admin_config'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  enterpriseCustomizedLogin?: boolean(name='enterprise_customized_login', description='企业文件管理专属登录开关'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  expireTime?: int64(name='expire_time', description='预付费domain过期时间', format='int64'),
  groupSingleDriveEnabled?: boolean(name='group_single_drive_enabled'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: int64(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  mode?: string(name='mode', description='Domain 类型', example='StandardMode'),
  officePreviewConfig?: OfficePreviewConfig(name='office_preview_config'),
  parallelUploadEnabled?: boolean(name='parallel_upload_enabled'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  prepaidPackage?: string(name='prepaid_package', description='预付费套餐'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  serviceCode?: string(name='service_code', description='Domain ServiceCode', example='"edm"'),
  sharable?: boolean(name='sharable', description='是否开启了共享', example=true),
  shareLinkEnabled?: boolean(name='share_link_enabled', description='是否开启了分享', example=true),
  sizeQuota?: int64(name='size_quota', description='容量配额', format='int64'),
  spiInstanceId?: string(name='spi_instance_id', description='SPI 实例 id'),
  status?: int64(name='status', description='domain状态：创建中，正常，已过期', format='int64'),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
  userCountQuota?: int64(name='user_count_quota', description='用户数配额', format='int64'),
  userSingleDriveEnabled?: boolean(name='user_single_drive_enabled', description='user和group只能有一个drive的开关'),
  videoPreviewConfig?: VideoPreviewConfig(name='video_preview_config'),
}

/**
 * 
 */
model BaseSubdomainResponse {
  createdAt: string(name='created_at', description='创建时间', example='"2021-02-05T06:07:05.181Z"'),
  description: string(name='description', description='描述', example='"描述-1"'),
  name: string(name='name', description='名称', example='"subdomain-1"'),
  subdomainId: string(name='subdomain_id', description='用以唯一标识subdomain', example='"c477c77a-aea8-413e-9ff0-30c24eeeae01"'),
  totalSize: int64(name='total_size', description='逻辑空间quota，-1表示无限制，单位为字节', example=1073741824, format='int64'),
  updatedAt: string(name='updated_at', description='更新时间', example='"2021-02-05T06:07:05.181Z"'),
  userQuota: int64(name='user_quota', description='用户数quota，-1表示无限制', example=-1, format='int64'),
}

/**
 * Benefit base info of benefit package
 */
model BenefitBaseResponse {
  benefitId?: string(name='benefit_id', description='权益的唯一标识', example='face_group'),
  benefitMeta?: BenefitMetaResponse(name='benefit_meta'),
  benefitPkgId?: string(name='benefit_pkg_id', description='权益包的唯一标识', example='value_add'),
  name?: string(name='name', description='权益的名称', example='人脸聚类'),
}

/**
 * Benefit meta response
 */
model BenefitMetaResponse {
  config?: string(name='config', description='权益的配置', example='"{}"'),
  enabled?: boolean(name='enabled', description='权益的开关', example=false),
  quota?: int64(name='quota', description='权益的配额', example=53687091200, format='int64'),
}

/**
 * Benefit package delivery info
 */
model BenefitPkgDeliveryInfoResponse {
  amount?: int64(name='amount', description='权益包下发的数量', example=100, format='int64'),
  createdAt?: string(name='created_at', description='权益包下发的创建时间', example='2019-08-20T06:51:27.292Z'),
  expireTime?: string(name='expire_time', description='权益包下发的超期时间，is_permanent为false时，返回有效值', example='2019-08-20T06:51:27.292Z'),
  isPermanent?: boolean(name='is_permanent', description='权益包是否永久有效', example=false),
}

/**
 * 
 */
model CNameStatus {
  bingdingState: string(name='bingding_state', description='binding state', example='BINDING'),
  legalState: string(name='legal_state', description='legal state', example='NORMAL'),
  remark: string(name='remark', description='remark', example='beian'),
}

/**
 * create domain response
 */
model CreateDomainResponse {
  apiCname?: string(name='api_cname', description='Domain APICName', example='"pdsapi.yoursite.com"'),
  appCname?: string(name='app_cname', description='Domain AppCName', example='"pdsapp.yoursite.com"'),
  appConfig?: AppConfig(name='app_config'),
  auditLogConfig?: AuditLogConfig(name='audit_log_config'),
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authCname?: string(name='auth_cname', description='Domain AuthCName', example='"pdsauth.yoursite.com"'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  benefits?: object(name='benefits', additionalProperties='{"$ref":"#/definitions/BenefitMetaResponse"}'),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  defaultSuperAdminConfig?: DomainSuperAdminConfig(name='default_super_admin_config'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  enterpriseCustomizedLogin?: boolean(name='enterprise_customized_login', description='企业文件管理专属登录开关'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  expireTime?: int64(name='expire_time', description='预付费domain过期时间', format='int64'),
  groupSingleDriveEnabled?: boolean(name='group_single_drive_enabled'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: int64(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  mode?: string(name='mode', description='Domain 类型', example='StandardMode'),
  officePreviewConfig?: OfficePreviewConfig(name='office_preview_config'),
  parallelUploadEnabled?: boolean(name='parallel_upload_enabled'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  prepaidPackage?: string(name='prepaid_package', description='预付费套餐'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  serviceCode?: string(name='service_code', description='Domain ServiceCode', example='"edm"'),
  sharable?: boolean(name='sharable', description='是否开启了共享', example=true),
  shareLinkEnabled?: boolean(name='share_link_enabled', description='是否开启了分享', example=true),
  sizeQuota?: int64(name='size_quota', description='容量配额', format='int64'),
  spiInstanceId?: string(name='spi_instance_id', description='SPI 实例 id'),
  status?: int64(name='status', description='domain状态：创建中，正常，已过期', format='int64'),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
  userCountQuota?: int64(name='user_count_quota', description='用户数配额', format='int64'),
  userSingleDriveEnabled?: boolean(name='user_single_drive_enabled', description='user和group只能有一个drive的开关'),
  videoPreviewConfig?: VideoPreviewConfig(name='video_preview_config'),
}

/**
 * 
 */
model CreateSubdomainRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='描述', example='"描述-1"'),
  name: string(name='name', description='名称，注意该字段会校验重名的subdomain', example='"subdomain-1"'),
  totalSize?: int64(name='total_size', description='逻辑空间quota，默认为-1，无限制，单位为字节', example=1099511627776, format='int64'),
  userQuota?: int64(name='user_quota', description='用户数quota，默认为-1，无限制', example=100, format='int64'),
}

/**
 * 
 */
model CreateSubdomainResponse {
  subdomainId: string(name='subdomain_id', description='用以唯一标识subdomain', example='"c477c77a-aea8-413e-9ff0-30c24eeeae01"'),
}

/**
 * 
 */
model DataCName {
  dataCname: string(name='data_cname', description='datacname', example='pdsdata-cn-hangzhou.yoursite.com'),
  location: string(name='location', description='data location', example='cn-hangzhou'),
}

/**
 * 
 */
model DeleteSubdomainRequest {
  httpheaders?: map[string]string,
  subdomainId: string(name='subdomain_id', description='用以唯一标识subdomain', example='"c477c77a-aea8-413e-9ff0-30c24eeeae01"'),
}

/**
 * 
 */
model DeleteSubdomainResponse {
}

/**
 * 
 */
model DomainCNameResponse {
  dataCnameList: [ DataCName ](name='data_cname_list', description='data cname list', items='{"$ref":"#/definitions/DataCName"}'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
}

/**
 * 
 */
model DomainSuperAdminConfig {
  phoneNumber?: string(name='phone_number'),
  phoneRegion?: string(name='phone_region'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model DriveLogDetail {
  name?: string(name='name', description='name', example='abc'),
  ownerId?: string(name='owner_id', description='owner_id', example='123'),
  ownerName?: string(name='owner_name', description='owner_name', example='user2'),
  ownerType?: string(name='owner_type', description='owner_type', enum='user,  group', example='user'),
  totalSize?: int64(name='total_size', description='total_size', example=102400, format='int64'),
  updateTo?: DriveLogSettingDetail(name='update_to'),
}

/**
 * 
 */
model DriveLogSettingDetail {
  name?: string(name='name', description='name', example='abc'),
  ownerId?: string(name='owner_id', description='owner_id', example='123'),
  ownerName?: string(name='owner_name', description='owner_name', example='user2'),
  ownerType?: string(name='owner_type', description='owner_type', enum='user,  group', example='user'),
  totalSize?: int64(name='total_size', description='total_size', example=102400, format='int64'),
}

/**
 * 导出审计日志request
 */
model ExportAuditLogRequest {
  httpheaders?: map[string]string,
  fileName?: string(name='file_name', description='file_name', example='log.csv'),
  language?: string(name='language', description='language', example='en_US'),
  orderBy?: string(name='order_by', description='order_by', enum='acted_at DESC', example='name'),
  query?: string(name='query', description='query', example='not actor_name=user1', maxLength=4096),
}

/**
 * 导出审计日志response
 */
model ExportAuditLogResponse {
  asyncTaskId?: string(name='async_task_id'),
}

/**
 * 
 */
model FileLogDetail {
  newName?: string(name='new_name', description='new_name', example='test.txt'),
  parentPath?: string(name='parent_path', description='parent_path', example='/a/b/c'),
  toParentPath?: string(name='to_parent_path', description='to_parent_path', example='/e/f/g'),
  toParentPathType?: string(name='to_parent_path_type', description='to_parent_path_type', example='self'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
}

/**
 * 
 */
model GetAppPublicKeyResponse {
  appId: string(name='app_id', description='App ID', example='cksaljkfiwasdn'),
  publicKey: string(name='public_key', description='RSA加密算法的公钥, PEM格式', example='-----BEGIN RSA PUBLIC KEY-----****-----END RSA PUBLIC KEY-----'),
}

/**
 * 
 */
model GetAppResponse {
  aliOwnerId: string(name='ali_owner_id', description='App 拥有者', example='172***430'),
  appId: string(name='app_id', description='App ID', example='cksaljkfiwasdn'),
  appName: string(name='app_name', description='App名称', example='图片分享应用', maxLength=128, minLength=1, pattern='[0-9a-zA-Z]+'),
  appSecret: string(name='app_secret', description='App 秘钥', example='sax***Js9'),
  createdAt: string(name='created_at', description='App 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  description: string(name='description', description='App描述', example='测试专用', maxLength=128, minLength=0),
  logo: string(name='logo', description='App图标', example='https://app.com/logo.jpg'),
  provider: string(name='provider', description='App 提供方', example='Alibaba Inc.'),
  redirectUri: string(name='redirect_uri', description='App回调地址', example='https://app.com/callback'),
  scope: [ string ](name='scope', description='App权限列表', enum='FILE.ALL, SHARE.ALL, STORAGEFILE.ALL, STORAGE.ALL, DRIVE.ALL, USER.ALL', items='{"type":"string"}'),
  screenshots: [ string ](name='screenshots', description='App 屏幕截图', example='http://app.com/screenshot_1.jpg', items='{"type":"string"}'),
  stage: string(name='stage', default='UnPublished,Pending,Published', description='App 当前阶段', example='UnPublished'),
  type: string(name='type', default='WebServer', description='App类型', enum='WebServer, WebBrowser, Native', example='WebServer'),
  updatedAt: string(name='updated_at', description='App 修改时间', example='"2019-08-31T12:58:31.137Z"'),
}

/**
 * 
 */
model GetBizCNameInfoResponse {
  bizCname?: string(name='biz_cname', description='biz cname', example='api.yoursite.com'),
  certId?: string(name='cert_id', description='cert name', example='aa-bb-cc-dd'),
  certName?: string(name='cert_name', description='cert name', example='xdrv2020cert'),
  cnameStatus?: CNameStatus(name='cname_status'),
  cnameType?: string(name='cname_type', description='cname type', example='api'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='is vpc', example=false),
}

/**
 * get domain response
 */
model GetDomainResponse {
  apiCname?: string(name='api_cname', description='Domain APICName', example='"pdsapi.yoursite.com"'),
  appCname?: string(name='app_cname', description='Domain AppCName', example='"pdsapp.yoursite.com"'),
  appConfig?: AppConfig(name='app_config'),
  auditLogConfig?: AuditLogConfig(name='audit_log_config'),
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authCname?: string(name='auth_cname', description='Domain AuthCName', example='"pdsauth.yoursite.com"'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  benefits?: object(name='benefits', additionalProperties='{"$ref":"#/definitions/BenefitMetaResponse"}'),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  defaultSuperAdminConfig?: DomainSuperAdminConfig(name='default_super_admin_config'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  enterpriseCustomizedLogin?: boolean(name='enterprise_customized_login', description='企业文件管理专属登录开关'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  expireTime?: int64(name='expire_time', description='预付费domain过期时间', format='int64'),
  groupSingleDriveEnabled?: boolean(name='group_single_drive_enabled'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: int64(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  mode?: string(name='mode', description='Domain 类型', example='StandardMode'),
  officePreviewConfig?: OfficePreviewConfig(name='office_preview_config'),
  parallelUploadEnabled?: boolean(name='parallel_upload_enabled'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  prepaidPackage?: string(name='prepaid_package', description='预付费套餐'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  serviceCode?: string(name='service_code', description='Domain ServiceCode', example='"edm"'),
  sharable?: boolean(name='sharable', description='是否开启了共享', example=true),
  shareLinkEnabled?: boolean(name='share_link_enabled', description='是否开启了分享', example=true),
  sizeQuota?: int64(name='size_quota', description='容量配额', format='int64'),
  spiInstanceId?: string(name='spi_instance_id', description='SPI 实例 id'),
  status?: int64(name='status', description='domain状态：创建中，正常，已过期', format='int64'),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
  userCountQuota?: int64(name='user_count_quota', description='用户数配额', format='int64'),
  userSingleDriveEnabled?: boolean(name='user_single_drive_enabled', description='user和group只能有一个drive的开关'),
  videoPreviewConfig?: VideoPreviewConfig(name='video_preview_config'),
}

/**
 * 
 */
model GetSubdomainRequest {
  httpheaders?: map[string]string,
  subdomainId: string(name='subdomain_id', description='用以唯一标识subdomain', example='"c477c77a-aea8-413e-9ff0-30c24eeeae01"'),
}

/**
 * 
 */
model GetSubdomainResponse {
  createdAt: string(name='created_at', description='创建时间', example='"2021-02-05T06:07:05.181Z"'),
  description: string(name='description', description='描述', example='"描述-1"'),
  name: string(name='name', description='名称', example='"subdomain-1"'),
  subdomainId: string(name='subdomain_id', description='用以唯一标识subdomain', example='"c477c77a-aea8-413e-9ff0-30c24eeeae01"'),
  totalSize: int64(name='total_size', description='逻辑空间quota，-1表示无限制，单位为字节', example=1073741824, format='int64'),
  updatedAt: string(name='updated_at', description='更新时间', example='"2021-02-05T06:07:05.181Z"'),
  userQuota: int64(name='user_quota', description='用户数quota，-1表示无限制', example=-1, format='int64'),
}

/**
 * 
 */
model GetUserAccessTokenRequest {
  httpheaders?: map[string]string,
  subdomainId?: string(name='subdomain_id', description='subdomain ID', example='"9fd34986bd30489f8dbf2208d41c66c2"'),
  userId: string(name='user_id', description='用户 ID', example='"user-xxx"'),
}

/**
 * 
 */
model GetUserAccessTokenResponse {
  accessToken: string(name='access_token', description='用于调用业务接口的accessToken', example='cnskjajkahwdhwialsnd'),
  defaultDriveId: string(name='default_drive_id', description='Default Drive ID', example='100'),
  expireTime: string(name='expire_time', description='accessToken过期时间，ISO时间', example='2019-09-01T06:57:48.813Z'),
  expiresIn: int64(name='expires_in', description='accessToken过期时间，单位秒', example=3600, format='int64'),
  refreshToken?: string(name='refresh_token', description='用于刷新accessToken', example='cnskjajkahwdhwialsnd'),
  role: string(name='role', description='当前用户角色', example='user'),
  tokenType: string(name='token_type', description='accessToken类型，Bearer', example='Bearer'),
  userId: string(name='user_id', description='当前用户ID', example='DING-xxxxx'),
}

/**
 * 
 */
model GroupLogDetail {
  name?: string(name='name', description='name', example='abc'),
  parentGroupId?: string(name='parent_group_id', description='parent_group_id', example='123'),
  parentGroupName?: string(name='parent_group_name', description='parent_group_name', example='group2'),
  updateTo?: GroupLogSettingDetail(name='update_to'),
}

/**
 * 
 */
model GroupLogSettingDetail {
  name?: string(name='name', description='name', example='abc'),
  parentGroupId?: string(name='parent_group_id', description='parent_group_id', example='123'),
  parentGroupName?: string(name='parent_group_name', description='parent_group_name', example='group2'),
}

/**
 * Identity benefit package response
 */
model IdentityBenefitPkgResponse {
  benefitList?: [ BenefitBaseResponse ](name='benefit_list', description='权益包中的权益列表', items='{"$ref":"#/definitions/BenefitBaseResponse"}'),
  benefitPkgId?: string(name='benefit_pkg_id', description='权益包的唯一标识', example='value_add'),
  deliveryInfoList?: [ BenefitPkgDeliveryInfoResponse ](name='delivery_info_list', description='权益包的下发信息', items='{"$ref":"#/definitions/BenefitPkgDeliveryInfoResponse"}'),
  name?: string(name='name', description='权益包的名称', example='增值服务权益包'),
}

/**
 * 
 */
model ListAppsResponse {
  items: [ GetAppResponse ](name='items', description='App 列表', example='', items='{"$ref":"#/definitions/GetAppResponse"}'),
  nextMarker?: string(name='next_marker', description='App 分批查询游标', example='ncsajnsalsa='),
}

/**
 * list domain cors response
 */
model ListDomainCORSRuleResponse {
  corsRuleList?: [ CorsRule ](name='cors_rule_list', description='cors rule 列表', items='{"$ref":"#/definitions/CorsRule"}'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
}

/**
 * list domain response
 */
model ListDomainsResponse {
  items?: [ BaseDomainResponse ](name='items', description='domain 列表', example='', items='{"$ref":"#/definitions/BaseDomainResponse"}'),
  nextMarker?: string(name='next_marker', description='下次分页查询游标', example='NWQ1YmI4MjA0ZGU1ZWNjYzAzODM0ZDVkODlkMWJiMzcyNzM1NTU4OA'),
}

/**
 * List identity benefit package response
 */
model ListIdentityBenefitPkgResponse {
  items?: [ IdentityBenefitPkgResponse ](name='items', items='{"$ref":"#/definitions/IdentityBenefitPkgResponse"}'),
}

/**
 * 
 */
model ListStoresResponse {
  items: [ Store ](name='items', description='Store 列表', example='', items='{"$ref":"#/definitions/Store"}'),
}

/**
 * 
 */
model ListSubdomainsRequest {
  httpheaders?: map[string]string,
  limit?: int32(name='limit', description='数量，默认为50', format='int32'),
  marker?: string(name='marker', description='分页游标，可从 response 中获取'),
}

/**
 * 
 */
model ListSubdomainsResponse {
  items: [ BaseSubdomainResponse ](name='items', description='分页的 subdomain 数据', items='{"$ref":"#/definitions/BaseSubdomainResponse"}'),
  nextMarker: string(name='next_marker', description='分页游标，可以用作下次list的起点', example='"OGZlODBmMWQtM2RiMi00MjA1LTg2NDktY2NkOThkMmI5NmE5"'),
}

/**
 * 
 */
model LogDetail {
  driveLogDetail?: DriveLogDetail(name='drive_log_detail'),
  fileLogDetail?: FileLogDetail(name='file_log_detail'),
  groupLogDetail?: GroupLogDetail(name='group_log_detail'),
  membershipLogDetail?: MembershipLogDetail(name='membership_log_detail'),
  roleLogDetail?: RoleLogDetail(name='role_log_detail'),
  shareLinkLogDetail?: ShareLinkLogDetail(name='share_link_log_detail'),
  shareLogDetail?: ShareLogDetail(name='share_log_detail'),
  userLogDetail?: UserLogDetail(name='user_log_detail'),
}

/**
 * 
 */
model MembershipLogDetail {
  groupId?: string(name='group_id', description='group_id', example='123'),
  groupName?: string(name='group_name', description='group_name', example='group1'),
  memberName?: string(name='member_name', description='member_name', example='user1'),
  memberType?: string(name='member_type', description='member_type', enum='user,  group', example='user'),
}

/**
 * OfficePreviewConfig 文档预览配置
 */
model OfficePreviewConfig {
  enabled?: boolean(name='enabled'),
}

/**
 * 
 */
model RoleLogDetail {
  manageResourceId?: string(name='manage_resource_id', description='manage_resource_id', example='a123'),
  manageResourceName?: string(name='manage_resource_name', description='manage_resource_name', example='user_name_123'),
  manageResourceType?: string(name='manage_resource_type', description='manage_resource_type', example='user'),
  memberType?: string(name='member_type', description='member_type', enum='user,  group', example='user'),
  roleId?: string(name='role_id', description='role_id', example='SystemBaseSettingAdmin'),
  roleTagDescription?: string(name='role_tag_description', description='role_tag_description', example='role_tag_123_description'),
  roleTagName?: string(name='role_tag_name', description='role_tag_name', example='role_tag_123'),
  updateTo?: RoleLogSettingDetail(name='update_to'),
}

/**
 * 
 */
model RoleLogSettingDetail {
  roleTagDescription?: string(name='role_tag_description', description='role_tag_description', example='role_tag_123_description'),
  roleTagName?: string(name='role_tag_name', description='role_tag_name', example='role_tag_123'),
}

/**
 * 查询审计日志request
 */
model SearchAuditLogRequest {
  httpheaders?: map[string]string,
  limit?: int32(name='limit', default=50, description='limit', example=10, format='int32', maximum=200, minimum=1),
  marker?: string(name='marker', description='Marker', example='NWmJDQ2NzhlMTRhMg'),
  orderBy?: string(name='order_by', description='order_by', enum='acted_at DESC', example='name'),
  query?: string(name='query', description='query', example='not actor_name=user1', maxLength=4096),
}

/**
 * 查询审计日志response
 */
model SearchAuditLogResponse {
  items?: [ BaseAuditLogResponse ](name='items', description='items', example='', items='{"$ref":"#/definitions/BaseAuditLogResponse"}', maxItems=200),
  nextMarker?: string(name='next_marker', description='next_marker', example='NWmJDQ2NzhlMTRhMg'),
}

/**
 * 
 */
model SetBizCNameCertResponse {
  bizCname?: string(name='biz_cname', description='biz cname', example='api.yoursite.com'),
  certName?: string(name='cert_name', description='cert name', example='xdrv2020cert'),
  cnameType?: string(name='cname_type', description='cname type', example='api'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='is vpc', example=false),
}

/**
 * 
 */
model SetBizCNameResponse {
  bizCname?: string(name='biz_cname', description='biz cname', example='api.yoursite.com'),
  cnameStatus?: CNameStatus(name='cname_status'),
  cnameType?: string(name='cname_type', description='cname type', example='api'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  isVpc?: boolean(name='is_vpc', description='is vpc', example=false),
}

/**
 * 
 */
model SetDataCNameResponse {
  dataCname: string(name='data_cname', description='datacname', example='pdsdata-cn-hangzhou.yoursite.com'),
  domainId: string(name='domain_id', description='domain ID', example='sz100'),
  location: string(name='location', description='data location', example='cn-hangzhou'),
}

/**
 * 
 */
model ShareLinkLogDetail {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  hasMultiObject?: boolean(name='has_multi_object', description='has_multi_object', example=true),
  hasPwd?: boolean(name='has_pwd', description='has_pwd', example=false),
  shareId?: string(name='share_id', description='share_id (脱敏)', enum='file, folder', example='file'),
  toParentPath?: string(name='to_parent_path', description='to_parent_path', example='/e/f/g'),
  toParentPathType?: string(name='to_parent_path_type', description='to_parent_path_type', example='self'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
}

/**
 * 
 */
model ShareLogDetail {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  parentPath?: string(name='parent_path', description='parent_path', example='/a/b/c'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  roleId?: string(name='role_id', description='role_id', example='SystemFileViewer'),
  shareToId?: string(name='share_to_id', description='share_to_id', example='123'),
  shareToName?: string(name='share_to_name', description='share_to_name', example='user1'),
  shareToType?: string(name='share_to_type', description='share_to_type', enum='user,  group', example='user'),
  type?: string(name='type', description='type', enum='file, folder, drive', example='file'),
  updateTo?: ShareLogSettingDetail(name='update_to'),
}

/**
 * 
 */
model ShareLogSettingDetail {
  expiration?: string(name='expiration', description='expiration', example='2006-01-02T15:04:05.999Z'),
  permissions?: [ string ](name='permissions', description='permissions', example='', items='{"type":"string"}'),
  roleId?: string(name='role_id', description='role_id', example='SystemFileViewer'),
}

/**
 * create domain response
 */
model UpdateDomainResponse {
  apiCname?: string(name='api_cname', description='Domain APICName', example='"pdsapi.yoursite.com"'),
  appCname?: string(name='app_cname', description='Domain AppCName', example='"pdsapp.yoursite.com"'),
  appConfig?: AppConfig(name='app_config'),
  auditLogConfig?: AuditLogConfig(name='audit_log_config'),
  authAlipayAppId?: string(name='auth_alipay_app_id', description='支付宝 App Id', example='abc'),
  authAlipayEnable?: boolean(name='auth_alipay_enable', description='是否开启了支付宝认证', example=true),
  authAlipayPrivateKey?: string(name='auth_alipay_private_key', description='支付宝 App Secret', example='abc'),
  authCname?: string(name='auth_cname', description='Domain AuthCName', example='"pdsauth.yoursite.com"'),
  authConfig?: object(name='auth_config', additionalProperties='{"$ref":"#/definitions/AuthConfig"}', description='登录相关信息', example='{}'),
  authDingdingAppId?: string(name='auth_dingding_app_id', description='钉钉 App Id', example='abc'),
  authDingdingAppSecret?: string(name='auth_dingding_app_secret', description='钉钉 App Secret', example='abc'),
  authDingdingEnable?: boolean(name='auth_dingding_enable', description='是否开启了钉钉认证', example=true),
  authEndpointEnable?: boolean(name='auth_endpoint_enable'),
  authRamAppId?: string(name='auth_ram_app_id', description='RAM App Id', example='abc'),
  authRamAppSecret?: string(name='auth_ram_app_secret', description='RAM App Secret', example='abc'),
  authRamEnable?: boolean(name='auth_ram_enable', description='是否开启了 RAM 认证', example=true),
  benefits?: object(name='benefits', additionalProperties='{"$ref":"#/definitions/BenefitMetaResponse"}'),
  createdAt?: string(name='created_at', description='Domain 创建时间', example='"2019-08-31T12:58:31.137Z"'),
  dataHashName?: string(name='data_hash_name', description='数据 Hash 算法', example='sha1'),
  defaultSuperAdminConfig?: DomainSuperAdminConfig(name='default_super_admin_config'),
  description?: string(name='description', description='Domain 描述', example='my test domain'),
  domainId?: string(name='domain_id', description='Domain ID', example='sz111'),
  domainName?: string(name='domain_name', description='Domain 描述', example='my test domain'),
  enterpriseCustomizedLogin?: boolean(name='enterprise_customized_login', description='企业文件管理专属登录开关'),
  eventFilenameMatches?: string(name='event_filename_matches', description='事件通知 MNS 匹配文件名', example='abc'),
  eventMnsEndpoint?: string(name='event_mns_endpoint', description='事件通知 MNS Endpoint', example='http://abc.mns.cn-shenzhen.aliyuncs.com'),
  eventMnsTopic?: string(name='event_mns_topic', description='事件通知 MNS Topic', example='abc'),
  eventNames?: [ string ](name='event_names', description='事件名列表', example='abc', items='{"type":"string"}'),
  eventRoleArn?: string(name='event_role_arn', description='事件通知 Role Arn'),
  expireTime?: int64(name='expire_time', description='预付费domain过期时间', format='int64'),
  groupSingleDriveEnabled?: boolean(name='group_single_drive_enabled'),
  initDriveEnable?: boolean(name='init_drive_enable', description='是否开启了自动初始化 Drive', example=true),
  initDriveSize?: int64(name='init_drive_size', description='自动初始化 Drive 大小', example=1024, format='int64'),
  initDriveStoreId?: string(name='init_drive_store_id', description='自动初始化 Drive 所用 Store ID', example='1'),
  mode?: string(name='mode', description='Domain 类型', example='StandardMode'),
  officePreviewConfig?: OfficePreviewConfig(name='office_preview_config'),
  parallelUploadEnabled?: boolean(name='parallel_upload_enabled'),
  pathType?: string(name='path_type', description='Domain 类型', example='CCPPath'),
  prepaidPackage?: string(name='prepaid_package', description='预付费套餐'),
  publishedAppAccessStrategy?: AppAccessStrategy(name='published_app_access_strategy'),
  serviceCode?: string(name='service_code', description='Domain ServiceCode', example='"edm"'),
  sharable?: boolean(name='sharable', description='是否开启了共享', example=true),
  shareLinkEnabled?: boolean(name='share_link_enabled', description='是否开启了分享', example=true),
  sizeQuota?: int64(name='size_quota', description='容量配额', format='int64'),
  spiInstanceId?: string(name='spi_instance_id', description='SPI 实例 id'),
  status?: int64(name='status', description='domain状态：创建中，正常，已过期', format='int64'),
  storeLevel?: string(name='store_level', description='存储级别', example='Standard'),
  storeRegionList?: [ string ](name='store_region_list', description='存储 Region 列表', example='cn-hangzhou', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='Domain 更新时间', example='"2019-08-31T12:58:31.137Z"'),
  userCountQuota?: int64(name='user_count_quota', description='用户数配额', format='int64'),
  userSingleDriveEnabled?: boolean(name='user_single_drive_enabled', description='user和group只能有一个drive的开关'),
  videoPreviewConfig?: VideoPreviewConfig(name='video_preview_config'),
}

/**
 * 
 */
model UpdateSubdomainRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='描述', example='"描述-1"'),
  name?: string(name='name', description='名称', example='"subdomain-1"'),
  subdomainId: string(name='subdomain_id', description='用以唯一标识subdomain', example='"c477c77a-aea8-413e-9ff0-30c24eeeae01"'),
  totalSize?: int64(name='total_size', description='逻辑空间quota，-1表示无限制，单位为字节', example=1073741824, format='int64'),
  userQuota?: int64(name='user_quota', description='用户数quota，-1表示无限制', example=100, format='int64'),
}

/**
 * 
 */
model UpdateSubdomainResponse {
}

/**
 * 
 */
model UserLogDetail {
  name?: string(name='name', description='name', example='abc'),
  phone?: string(name='phone', description='phone', example='13700000000'),
  roleId?: string(name='role_id', description='role_id', enum='user, admin, superadmin', example='user'),
  updateTo?: UserLogSettingDetail(name='update_to'),
}

/**
 * 
 */
model UserLogSettingDetail {
  name?: string(name='name', description='name', example='abc'),
  roleId?: string(name='role_id', description='role_id', enum='user, admin, superadmin', example='user'),
}

/**
 * 音频转码参数
 */
model VideoPreviewAudio {
  audioBitrate?: int64(name='audio_bitrate', format='int64'),
  audioChannel?: int64(name='audio_channel', format='int64'),
  audioCodec?: string(name='audio_codec'),
  audioSampleRate?: int64(name='audio_sample_rate', format='int64'),
}

/**
 * 音频转码配置
 */
model VideoPreviewAudioConfig {
  supportExt?: [ string ](name='support_ext', items='{"type":"string"}'),
  template?: [ VideoPreviewAudioTemplate ](name='template', items='{"$ref":"#/definitions/VideoPreviewAudioTemplate"}'),
}

/**
 * 音频转码模板
 */
model VideoPreviewAudioTemplate {
  audioBitrate?: int64(name='audio_bitrate', format='int64'),
  audioChannel?: int64(name='audio_channel', format='int64'),
  audioCodec?: string(name='audio_codec'),
  audioOutputExt?: string(name='audio_output_ext'),
  audioSampleRate?: int64(name='audio_sample_rate', format='int64'),
  audioTemplateId?: string(name='audio_template_id'),
}

/**
 * 
 */
model VideoPreviewAutoScaleConfig {
  enabled?: boolean(name='enabled'),
  maxLength?: int64(name='max_length', format='int64'),
}

/**
 * 转码备份配置（当前仅运维会用到）
 */
model VideoPreviewBackupConfig {
  countOnce?: int64(name='count_once', format='int64'),
  store?: Store(name='store'),
  storeIdMap?: object(name='store_id_map', additionalProperties='{"type":"string"}'),
}

/**
 * 转码配置
 */
model VideoPreviewConfig {
  audioConfig?: VideoPreviewAudioConfig(name='audio_config'),
  audioTemplateList?: [ string ](name='audio_template_list', items='{"type":"string"}'),
  audioThumbnail?: VideoPreviewThumbnailConfig(name='audio_thumbnail'),
  backupConfig?: VideoPreviewBackupConfig(name='backup_config'),
  enableConfig?: VideoPreviewEnableConfig(name='enable_config'),
  enabled?: boolean(name='enabled'),
  liveTranscodingConfig?: VideoPreviewLiveTranscodingConfig(name='live_transcoding_config'),
  rateLimitConfig?: VideoPreviewRateLimitConfig(name='rate_limit_config'),
  sprite?: VideoPreviewSpriteConfig(name='sprite'),
  store?: Store(name='store'),
  storeIdMap?: object(name='store_id_map', additionalProperties='{"type":"string"}'),
  templateList?: [ string ](name='template_list', items='{"type":"string"}'),
  templatePolicyConfig?: VideoPreviewTemplatePolicyConfig(name='template_policy_config'),
  thumbnail?: VideoPreviewThumbnailConfig(name='thumbnail'),
  videoConfig?: VideoPreviewVideoConfig(name='video_config'),
  videoFilterConfig?: VideoPreviewVideoFilterConfig(name='video_filter_config'),
}

/**
 * 转码子开关配置
 */
model VideoPreviewEnableConfig {
  enableTranscodeWhenPlay?: boolean(name='enable_transcode_when_play'),
  enableTranscodeWhenUploaded?: boolean(name='enable_transcode_when_uploaded'),
}

/**
 * 实时转码配置
 */
model VideoPreviewLiveTranscodingConfig {
  currentVersion?: int64(name='current_version', format='int64'),
  deprecatedVersion?: int64(name='deprecated_version', format='int64'),
  detailCountLimit?: int64(name='detail_count_limit', format='int64'),
  enableConfig?: VideoPreviewLiveTranscodingEnableConfig(name='enable_config'),
  enabled?: boolean(name='enabled'),
  ignoreTemplateList?: [ string ](name='ignore_template_list', items='{"type":"string"}'),
  leadingPrefix?: string(name='leading_prefix'),
  m3u8FilePrefix?: string(name='m3u8_file_prefix'),
  mediaDurationLimit?: double(name='media_duration_limit', format='double'),
  refTaskConfig?: VideoPreviewLiveTranscodingRefTaskConfig(name='ref_task_config'),
  segment?: int64(name='segment', format='int64'),
  subtitleConfig?: VideoPreviewLiveTranscodingSubtitleConfig(name='subtitle_config'),
  templateList?: [ string ](name='template_list', items='{"type":"string"}'),
  tsCountWhenInitM3u8?: int64(name='ts_count_when_init_m3u8', description='Mode              string   `json:"mode"`               // 默认media模式
以下几个count需要根据task的status和stage来判断, 当前实时转码的状态', format='int64'),
  tsCountWhenTs404?: int64(name='ts_count_when_ts_404', format='int64'),
  tsFilePrefix?: string(name='ts_file_prefix'),
}

/**
 * 实时转码子开关配置
 */
model VideoPreviewLiveTranscodingEnableConfig {
  dropFileCreatedEvent?: boolean(name='drop_file_created_event'),
  enableIgnoreCopiedFile?: boolean(name='enable_ignore_copied_file'),
}

/**
 * 实时转码refTask配置
 */
model VideoPreviewLiveTranscodingRefTaskConfig {
  duration?: double(name='duration', format='double'),
  enabled?: boolean(name='enabled'),
}

/**
 * 实时转码字幕配置
 */
model VideoPreviewLiveTranscodingSubtitleConfig {
  enabled?: boolean(name='enabled'),
  extractFormat?: string(name='extract_format'),
  subtitleLangList?: [ string ](name='subtitle_lang_list', items='{"type":"string"}'),
}

/**
 * 
 */
model VideoPreviewM3U8Config {
  hlsTime?: int64(name='hls_time', format='int64'),
}

/**
 * 转码文件下载限速配置
 */
model VideoPreviewRateLimitConfig {
  rateLimit?: int64(name='rate_limit', format='int64'),
}

/**
 * 视频雪碧图配置
 */
model VideoPreviewSpriteConfig {
  autoScale?: VideoPreviewAutoScaleConfig(name='auto_scale'),
  col?: int64(name='col', format='int64'),
  frameHeight?: int64(name='frame_height', format='int64'),
  frameWidth?: int64(name='frame_width', format='int64'),
  interval?: VideoPreviewSpriteIntervalConfig(name='interval'),
  row?: int64(name='row', format='int64'),
}

/**
 * 雪碧图抓图间隔配置。如果配置异常，默认以1%抓图
 */
model VideoPreviewSpriteIntervalConfig {
  defaultInterval?: string(name='default_interval'),
  grabIntervalList?: [ string ](name='grab_interval_list', items='{"type":"string"}'),
  upperLimitList?: [ integer ](name='upper_limit_list', items='{"format":"int64","type":"integer"}'),
}

/**
 * 目前只提供一定的参数化即可, 因为太参数化会让整个代码逻辑过于复杂, 容易留下 bug
通过 hotfix 升级后台任务实现定制策略优化
 */
model VideoPreviewTemplatePolicyAliyundriveConfig {
  preTranscodeBeginDuration?: int64(name='pre_transcode_begin_duration', format='int64'),
}

/**
 * 转码模板选择策略配置
 */
model VideoPreviewTemplatePolicyConfig {
  aliyundriveConfig?: VideoPreviewTemplatePolicyAliyundriveConfig(name='aliyundrive_config'),
  policy?: string(name='policy'),
}

/**
 * 截图配置
 */
model VideoPreviewThumbnailConfig {
  skipBeginPercent?: string(name='skip_begin_percent'),
  skipBeginSec?: double(name='skip_begin_sec', format='double'),
}

/**
 * 视频转码参数
 */
model VideoPreviewVideo {
  height?: int64(name='height', format='int64'),
  keepOriginal?: boolean(name='keep_original'),
  videoBitrate?: int64(name='video_bitrate', format='int64'),
  videoCodec?: string(name='video_codec'),
  videoFrameRate?: int64(name='video_frame_rate', format='int64'),
  width?: int64(name='width', format='int64'),
}

/**
 * 视频转码配置
 */
model VideoPreviewVideoConfig {
  defaultOutputExt?: string(name='default_output_ext'),
  keepOriginal?: boolean(name='keep_original'),
  m3u8Config?: VideoPreviewM3U8Config(name='m3u8_config'),
  supportExt?: [ string ](name='support_ext', items='{"type":"string"}'),
  template?: [ VideoPreviewVideoTemplate ](name='template', items='{"$ref":"#/definitions/VideoPreviewVideoTemplate"}'),
}

/**
 * 转码源过滤配置（TODO: 未完整测试）
同时满足以下所有null条件，则不触发转码。如果没有配置任何条件，那么不触发过滤
 */
model VideoPreviewVideoFilterConfig {
  audioBitrate?: int64(name='audio_bitrate', format='int64'),
  audioChannel?: int64(name='audio_channel', format='int64'),
  audioCodecList?: [ string ](name='audio_codec_list', description='音频信息过滤', items='{"type":"string"}'),
  audioSampleRate?: int64(name='audio_sample_rate', format='int64'),
  bitrate?: int64(name='bitrate', format='int64'),
  duration?: int64(name='duration', description='综合信息过滤', format='int64'),
  height?: int64(name='height', format='int64'),
  pixel?: int64(name='pixel', format='int64'),
  size?: int64(name='size', format='int64'),
  videoBitrate?: int64(name='video_bitrate', format='int64'),
  videoCodecList?: [ string ](name='video_codec_list', description='视频信息过滤', items='{"type":"string"}'),
  videoFrameRate?: int64(name='video_frame_rate', format='int64'),
  width?: int64(name='width', format='int64'),
}

/**
 * 视频转码模板
 */
model VideoPreviewVideoTemplate {
  audioBitrate?: int64(name='audio_bitrate', format='int64'),
  audioChannel?: int64(name='audio_channel', format='int64'),
  audioCodec?: string(name='audio_codec'),
  audioSampleRate?: int64(name='audio_sample_rate', format='int64'),
  height?: int64(name='height', format='int64'),
  keepOriginal?: boolean(name='keep_original'),
  videoBitrate?: int64(name='video_bitrate', format='int64'),
  videoCodec?: string(name='video_codec'),
  videoFrameRate?: int64(name='video_frame_rate', format='int64'),
  videoOutputExt?: string(name='video_output_ext'),
  videoTemplateId?: string(name='video_template_id'),
  width?: int64(name='width', format='int64'),
}

/**
 * Add user to subdomain request
 */
model AddUserToSubdomainRequest {
  httpheaders?: map[string]string,
  subdomainId?: string(name='subdomain_id', description='subdomain id'),
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
}

/**
 * add file to view
 */
model AddViewFileRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  driveId?: string(name='drive_id'),
  fields?: object(name='fields', additionalProperties='{"type":"object"}'),
  fileId?: string(name='file_id'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * add file to view response
 */
model AddViewFileResponse {
  driveId?: string(name='drive_id'),
  fileId?: string(name='file_id'),
  viewId?: string(name='view_id'),
}

/**
 * 
 */
model Address {
  city?: string(name='city'),
  country?: string(name='country'),
  district?: string(name='district'),
  province?: string(name='province'),
  township?: string(name='township'),
}

/**
 * 
 */
model AlbumsBaseRequest {
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
}

/**
 * 
 */
model BaseGroupIDRequest {
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
}

/**
 * 
 */
model BaseGroupRequest {
  description?: string(name='description', description='描述', example='"desc-1"'),
  groupName: string(name='group_name', description='名称', example='"group-1"'),
  isRoot?: boolean(name='is_root', description='是否是根group', example=false),
}

/**
 * 
 */
model BaseGroupResponse {
  createdAt?: int64(name='created_at', description='created_at', example=111111, format='int64'),
  description?: string(name='description', description='description', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  groupName?: string(name='group_name', description='group name', example='"name-111"'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=111111, format='int64'),
}

/**
 * 
 */
model BaseMembershipResponse {
  createdAt?: int64(name='created_at', description='created_at', example=1111, format='int64'),
  description?: string(name='description', description='描述', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberRole?: string(name='member_role', description='角色， member or admin', example='"member"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=1111, format='int64'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model BaseRequest {
  category: string(name='category', description='category', example='"album"'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * Base user response
 */
model BaseUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: int64(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  denyChangePasswordBySelf?: boolean(name='deny_change_password_by_self', description='禁止用户自行修改密码'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  needChangePasswordNextLogin?: boolean(name='need_change_password_next_login', description='下次登录强制修改密码'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  punishFlag?: int64(name='punish_flag', description='用户处罚标志', format='int64'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: int64(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

/**
 * 
 */
model CreateGroupRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='描述', example='"desc-1"'),
  groupName: string(name='group_name', description='名称', example='"group-1"'),
  isRoot?: boolean(name='is_root', description='是否是根group', example=false),
  parentGroupId?: string(name='parent_group_id', description='parent group id'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
}

/**
 * 
 */
model CreateGroupResponse {
  createdAt?: int64(name='created_at', description='created_at', example=111111, format='int64'),
  description?: string(name='description', description='description', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  groupName?: string(name='group_name', description='group name', example='"name-111"'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=111111, format='int64'),
}

/**
 * 
 */
model CreateMembershipRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='描述', example='"desc-111"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberRole?: string(name='member_role', description='角色， member or admin', example='"member"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  subdomainId?: string(name='subdomain_id'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model CreateMembershipResponse {
  createdAt?: int64(name='created_at', description='created_at', example=1111, format='int64'),
  description?: string(name='description', description='描述', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberRole?: string(name='member_role', description='角色， member or admin', example='"member"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=1111, format='int64'),
  userId?: string(name='user_id'),
}

/**
 * Create story request
 */
model CreateStoryRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  maxImageCount?: int64(name='max_image_count', description='max_image_count', example=100, format='int64'),
  minImageCount?: int64(name='min_image_count', description='min_image_count', example=1, format='int64'),
  storyEndTime?: string(name='story_end_time', description='story_end_time', example='"2199-01-01T00:00:01.544Z"'),
  storyId?: string(name='story_id', description='story_id'),
  storyName?: string(name='story_name', description='story_name', example='"custom"'),
  storyStartTime?: string(name='story_start_time', description='story_start_time', example='"2020-11-10T00:00:01.544Z"'),
  storyType: string(name='story_type', description='story_type', example='"TimeMemory"'),
}

/**
 * 生成故事
 */
model CreateStoryResponse {
  driveId?: string(name='drive_id', description='drive_id'),
}

/**
 * Create user request
 */
model CreateUserRequest {
  httpheaders?: map[string]string,
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  denyChangePasswordBySelf?: boolean(name='deny_change_password_by_self', description='是否能自己修改密码', example=false),
  description?: string(name='description', description='描述信息', example='ccp team user', maxLength=1024),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  groupInfoList?: [ GroupInfo ](name='group_info_list', items='{"$ref":"#/definitions/GroupInfo"}'),
  location?: string(name='location', description='用户地域'),
  needChangePasswordNextLogin?: boolean(name='need_change_password_next_login', description='下次登录后是否强制修改密码', example=false),
  nickName?: string(name='nick_name', description='昵称', example='ccpuser'),
  phone?: string(name='phone', description='电话号码', example='13700000000'),
  plainPassword?: string(name='plain_password', description='用户明文密码', example='123456'),
  role?: string(name='role', default='user', description='角色', enum='superadmin, admin, user', example='user'),
  status?: string(name='status', default='enabled', description='状态', enum='enabled, disabled', example='enabled'),
  subdomainId?: string(name='subdomain_id', description='subdomain id'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='abc'),
}

/**
 * Create user response
 */
model CreateUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: int64(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  denyChangePasswordBySelf?: boolean(name='deny_change_password_by_self', description='禁止用户自行修改密码'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  needChangePasswordNextLogin?: boolean(name='need_change_password_next_login', description='下次登录强制修改密码'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  punishFlag?: int64(name='punish_flag', description='用户处罚标志', format='int64'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: int64(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

/**
 * Create view request
 */
model CreateViewRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  description?: string(name='description', description='description', example='"abc"'),
  name: string(name='name', description='name', example='"abc"'),
  owner: string(name='owner', description='owner', example='"123"'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
}

/**
 * 创建逻辑视图
 */
model CreateViewResponse {
  category?: string(name='category'),
  owner?: string(name='owner'),
  viewId?: string(name='view_id'),
}

/**
 * 
 */
model DeleteGroupRequest {
  httpheaders?: map[string]string,
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
}

/**
 * 
 */
model DeleteGroupResponse {
}

/**
 * 
 */
model DeleteMembershipRequest {
  httpheaders?: map[string]string,
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model DeleteMembershipResponse {
}

/**
 * delete story request
 */
model DeleteStoryRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  storyId: string(name='story_id', description='story_id', example='"Story-uuid"'),
}

/**
 * 删除故事
 */
model DeleteStoryResponse {
  driveId?: string(name='drive_id', description='drive_id'),
}

/**
 * Delete user request
 */
model DeleteUserRequest {
  httpheaders?: map[string]string,
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
}

/**
 * Delete user response
 */
model DeleteUserResponse {
}

/**
 * Delete view request
 */
model DeleteViewRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * 
 */
model FaceBoundary {
  height?: int64(name='height', format='int64'),
  left?: int64(name='left', format='int64'),
  top?: int64(name='top', format='int64'),
  width?: int64(name='width', format='int64'),
}

/**
 * find story request
 */
model FindStoriesRequest {
  httpheaders?: map[string]string,
  coverImageThumbnailProcess?: string(name='cover_image_thumbnail_process', description='cover_image_thumbnail_process'),
  coverVideoThumbnailProcess?: string(name='cover_video_thumbnail_process', description='cover_video_thumbnail_process'),
  createTimeRange?: FindStoryRequestTimeRange(name='create_time_range'),
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  eventType?: string(name='event_type', description='event_type'),
  faceGroupIds?: [ string ](name='face_group_ids', description='face_group_ids', items='{"type":"string"}'),
  limit?: int64(name='limit', description='limit', format='int64'),
  marker?: string(name='marker', description='marker'),
  storyEndTimeRange?: FindStoryRequestTimeRange(name='story_end_time_range'),
  storyId?: string(name='story_id', description='story_id', example='"story112312"'),
  storyName?: string(name='story_name', description='story_name'),
  storyStartTimeRange?: FindStoryRequestTimeRange(name='story_start_time_range'),
  storyType?: string(name='story_type', description='story_type'),
  urlExpireSec?: int64(name='url_expire_sec', description='url_expire_sec', format='int64'),
}

/**
 * 生成故事
 */
model FindStoriesResponse {
  items?: [ GetStoryResponse ](name='items', description='items', items='{"$ref":"#/definitions/GetStoryResponse"}'),
  nextMarker?: string(name='next_marker', description='next_marker'),
}

/**
 * 
 */
model FindStoryRequestTimeRange {
  end?: string(name='end', description='end'),
  start?: string(name='start', description='start'),
}

/**
 * 
 */
model GetGroupRequest {
  httpheaders?: map[string]string,
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
}

/**
 * 
 */
model GetGroupResponse {
  createdAt?: int64(name='created_at', description='created_at', example=111111, format='int64'),
  description?: string(name='description', description='description', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  groupName?: string(name='group_name', description='group name', example='"name-111"'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=111111, format='int64'),
}

/**
 * Get photo count request
 */
model GetImageCountRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
}

/**
 * 获取云照片个数结果
 */
model GetImageCountResponse {
  imageCount?: int64(name='image_count', description='image_count', example=1, format='int64'),
}

/**
 * 
 */
model GetMembershipRequest {
  httpheaders?: map[string]string,
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model GetMembershipResponse {
  createdAt?: int64(name='created_at', description='created_at', example=1111, format='int64'),
  description?: string(name='description', description='描述', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberRole?: string(name='member_role', description='角色， member or admin', example='"member"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=1111, format='int64'),
  userId?: string(name='user_id'),
}

/**
 * Get story request
 */
model GetStoryRequest {
  httpheaders?: map[string]string,
  coverImageThumbnailProcess?: string(name='cover_image_thumbnail_process', description='cover_image_thumbnail_process'),
  coverVideoThumbnailProcess?: string(name='cover_video_thumbnail_process', description='cover_video_thumbnail_process'),
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  imageProcess?: string(name='image_process', description='image_process'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process'),
  storyId: string(name='story_id', description='story_id', example='"story112312"'),
  urlExpireSec?: int64(name='url_expire_sec', description='url_expire_sec', format='int64'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process'),
}

/**
 * 生成故事
 */
model GetStoryResponse {
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  coverFileThumbnailUrl?: string(name='cover_file_thumbnail_url', description='cover_file_url'),
  createdAt?: string(name='created_at', description='created_at'),
  eventType?: string(name='event_type', description='event_type'),
  faceGroupIds?: [ string ](name='face_group_ids', description='face_group_ids', items='{"type":"string"}'),
  storyEndTime?: string(name='story_end_time', description='story_end_time'),
  storyFileList?: [ BaseCCPFileResponse ](name='story_file_list', items='{"$ref":"#/definitions/BaseCCPFileResponse"}'),
  storyId?: string(name='story_id', description='story_id'),
  storyName?: string(name='story_name', description='story_name'),
  storyStartTime?: string(name='story_start_time', description='story_start_time'),
  storyType?: string(name='story_type', description='story_type'),
  updatedAt?: string(name='updated_at', description='updated_at'),
}

/**
 * Get user request
 */
model GetUserRequest {
  httpheaders?: map[string]string,
  userId?: string(name='user_id', description='用户 ID, 使用ak方式访问，该项必传, access_token访问如果不传，默认取自己的user信息
example'),
}

/**
 * Get user response
 */
model GetUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: int64(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  denyChangePasswordBySelf?: boolean(name='deny_change_password_by_self', description='禁止用户自行修改密码'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  needChangePasswordNextLogin?: boolean(name='need_change_password_next_login', description='下次登录强制修改密码'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  punishFlag?: int64(name='punish_flag', description='用户处罚标志', format='int64'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: int64(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

/**
 * Get view request
 */
model GetViewRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * 获取指定逻辑视图信息
 */
model GetViewResponse {
  category?: string(name='category'),
  createdAt?: string(name='created_at'),
  description?: string(name='description'),
  exFieldsInfo?: object(name='ex_fields_info', additionalProperties='{"type":"object"}'),
  fileCount?: int64(name='file_count', format='int64'),
  name?: string(name='name'),
  owner?: string(name='owner'),
  updatedAt?: string(name='updated_at'),
  viewId?: string(name='view_id'),
}

/**
 * 
 */
model GroupInfo {
  groupId?: string(name='group_id'),
  memberRole?: string(name='member_role', description='MemberRole 暂不对外，只作保留'),
}

/**
 * 
 */
model HasMemberRequest {
  httpheaders?: map[string]string,
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model HasMembershipResponse {
  result?: boolean(name='result'),
}

/**
 * 
 */
model ImageAddressResponse {
  addressDetail?: Address(name='address_detail'),
  count?: int64(name='count', description='聚类地点计数', example=1, format='int64'),
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  coverUrl?: string(name='cover_url', description='聚类地点封面图片地址', example='http://imm-dev-wmt/tags/05.jpg?x-oss-process=xxx'),
  location?: string(name='location', description='经纬度', example='39.21211,101.32111'),
  name?: string(name='name', description='聚类地点名称', example='杭州'),
}

/**
 * 
 */
model ImageFaceGroupResponse {
  createdAt?: string(name='created_at', description='人脸分组生成时间', example='2019-02-20T09:35:51.057Z'),
  faceCount?: int64(name='face_count', description='人脸个数', example=2, format='int64'),
  groupCoverFaceBoundary?: FaceBoundary(name='group_cover_face_boundary'),
  groupCoverFileId?: string(name='group_cover_file_id', description='group_cover_file_id'),
  groupCoverHeight?: int64(name='group_cover_height', description='group_cover_height', format='int64'),
  groupCoverUrl?: string(name='group_cover_url', description='人脸分组封面头像地址', example='http://imm-dev-wmt/facegroup/05.jpg?x-oss-process=xxx'),
  groupCoverWidth?: int64(name='group_cover_width', description='group_cover_width', format='int64'),
  groupId?: string(name='group_id', description='人脸分组 ID', example='abc'),
  groupName?: string(name='group_name', description='人脸分组名称', example='abc'),
  imageCount?: int64(name='image_count', description='照片个数', example=2, format='int64'),
  remarks?: string(name='remarks', description='remarks'),
  remarksArray?: [ string ](name='remarks_array', description='remarks_array', items='{"type":"string"}'),
  updatedAt?: string(name='updated_at', description='人脸分组修改时间', example='2019-02-20T09:35:51.057Z'),
}

/**
 * 
 */
model ImageTagResponse {
  count?: int64(name='count', description='聚类标签计数', example=1, format='int64'),
  coverFileCategory?: string(name='cover_file_category', description='cover_file_category'),
  coverFileId?: string(name='cover_file_id', description='cover_file_id'),
  coverOverallScore?: double(name='cover_overall_score', description='cover_score', format='double'),
  coverTagConfidence?: double(name='cover_tag_confidence', description='cover_tag_confidence', format='double'),
  coverUrl?: string(name='cover_url', description='聚类标签封面图片地址', example='http://imm-dev-wmt/tags/05.jpg?x-oss-process=xxx'),
  name?: string(name='name', description='聚类标签名称', example='篮球'),
}

/**
 * Import user request
 */
model ImportUserRequest {
  httpheaders?: map[string]string,
  authenticationType: string(name='authentication_type', description='认证类型', example='mobile'),
  autoCreateDrive?: boolean(name='auto_create_drive', description='自动创建空间', example=false),
  denyChangePasswordBySelf?: boolean(name='deny_change_password_by_self', description='是否能自己修改密码', example=false),
  driveTotalSize?: int64(name='drive_total_size', description='空间大小', example=1, format='int64'),
  extra?: string(name='extra', description='额外的信息，比如type为mobile时，此字段为国家编号，不填默认86', example='1'),
  identity: string(name='identity', description='唯一身份标识', example='15208333333'),
  needChangePasswordNextLogin?: boolean(name='need_change_password_next_login', description='下次登录后是否强制修改密码', example=false),
  nickName: string(name='nick_name', description='昵称', example='abc'),
  parentGroupId?: string(name='parent_group_id', description='加入到group', example='parent_group_id'),
  plainPassword?: string(name='plain_password', description='用户明文密码', example='123456'),
}

/**
 * 
 */
model ListDirectChildMembershipsRequest {
  httpheaders?: map[string]string,
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  limit?: int32(name='limit', description='分页获取的数量，默认为100', example=10, format='int32'),
  marker?: string(name='marker', description='游标', example='""'),
  memberType?: string(name='member_type', description='角色，可选值，["", "user", "group"], ""表示获取所有类型', example='"member"'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
}

/**
 * 
 */
model ListDirectChildMembershipsResponse {
  items?: [ BaseMembershipResponse ](name='items', description='items', example='items', items='{"$ref":"#/definitions/BaseMembershipResponse"}'),
  nextMarker?: string(name='next_marker', description='翻页标记', example='nextmarker'),
}

/**
 * 
 */
model ListDirectParentMembershipsRequest {
  httpheaders?: map[string]string,
  limit?: int32(name='limit', description='分页获取的数量，默认为100', example=10, format='int32'),
  marker?: string(name='marker', description='游标', example='""'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model ListDirectParentMembershipsResponse {
  items?: [ BaseMembershipResponse ](name='items', description='items', example='items', items='{"$ref":"#/definitions/BaseMembershipResponse"}'),
  nextMarker?: string(name='next_marker', description='翻页标记', example='nextmarker'),
}

/**
 * list file view ids
 */
model ListFileViewsRequest {
  httpheaders?: map[string]string,
  category?: string(name='category'),
  driveId?: string(name='drive_id'),
  fileId?: string(name='file_id'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
}

/**
 * list file view ids
 */
model ListFileViewsResponse {
  items?: [ GetViewResponse ](name='items', items='{"$ref":"#/definitions/GetViewResponse"}'),
}

/**
 * 
 */
model ListGroupRequest {
  httpheaders?: map[string]string,
  limit?: int32(name='limit', description='分页获取的数量，默认为100', example=10, format='int32'),
  marker?: string(name='marker', description='游标', example='""'),
  subdomainId?: string(name='subdomain_id', description='列举 subdomain 下的group', example='"b38b5681bd964950ad8bc0f8ea504793"'),
}

/**
 * 
 */
model ListGroupResponse {
  items?: [ BaseGroupResponse ](name='items', description='items', example='items', items='{"$ref":"#/definitions/BaseGroupResponse"}'),
  nextMarker?: string(name='next_marker', description='翻页标记', example='nextmarker'),
}

/**
 * List image address groups request
 */
model ListImageAddressGroupsRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  limit?: int32(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 展示地点分组集合
 */
model ListImageAddressGroupsResponse {
  items?: [ ImageAddressResponse ](name='items', items='{"$ref":"#/definitions/ImageAddressResponse"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * List image face groups request
 */
model ListImageFaceGroupsRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  limit?: int64(name='limit', default=100, description='每页大小限制', example=10, format='int64', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
  remarksArrayQuery?: RemarksQueryRequest(name='remarks_array_query'),
  remarksQuery?: RemarksQueryRequest(name='remarks_query'),
}

/**
 * 展示人脸分组集合
 */
model ListImageFaceGroupsResponse {
  items?: [ ImageFaceGroupResponse ](name='items', items='{"$ref":"#/definitions/ImageFaceGroupResponse"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * List image tags request
 */
model ListImageTagsRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 展示标签集合
 */
model ListImageTagsResponse {
  tags?: [ ImageTagResponse ](name='tags', items='{"$ref":"#/definitions/ImageTagResponse"}'),
}

/**
 * List user request
 */
model ListUserRequest {
  httpheaders?: map[string]string,
  limit?: int32(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
  subdomainId?: string(name='subdomain_id', description='subdomain id'),
}

/**
 * List user response
 */
model ListUserResponse {
  items?: [ BaseUserResponse ](name='items', items='{"$ref":"#/definitions/BaseUserResponse"}'),
  nextMarker?: string(name='next_marker', description='翻页标记', example='nextmarker'),
}

/**
 * list view file
 */
model ListViewFilesRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  fields?: string(name='fields'),
  filter?: string(name='filter'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  imageUrlProcess?: string(name='image_url_process', description='image_url_process', example='image/resize,w_200'),
  limit?: int32(name='limit', format='int32'),
  marker?: string(name='marker'),
  officeThumbnailProcess?: string(name='office_thumbnail_process', description='office_thumbnail_process', example='image/resize,w_200'),
  orderBy?: string(name='order_by'),
  orderDirection?: string(name='order_direction'),
  urlExpireSec?: int32(name='url_expire_sec', format='int32'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process
type:string', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * list view files response
 */
model ListViewFilesResponse {
  items?: [ ViewFileItem ](name='items', items='{"$ref":"#/definitions/ViewFileItem"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * List views request
 */
model ListViewsRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  limit?: int32(name='limit', default=50, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='marker', example='NWQ1Yjk4YmI1ZDRlYmU1Y2E0YWE0NmJhYWJmODBhNDQ2NzhlMTRhMg'),
  orderBy?: string(name='order_by', description='order_by', example='"abc"'),
  orderDirection?: string(name='order_direction', description='order_direction', enum='ASC, DESC', example='ASC'),
  owner: string(name='owner', description='owner', example='"123"'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
}

/**
 * 获取逻辑视图列表信息
 */
model ListViewsResponse {
  items?: [ GetViewResponse ](name='items', items='{"$ref":"#/definitions/GetViewResponse"}'),
  nextMarker?: string(name='next_marker'),
}

/**
 * 
 */
model MemberIDInfo {
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  userId?: string(name='user_id'),
}

/**
 * Merge face group request
 */
model MergeFaceGroupRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  fromGroupId: string(name='from_group_id', description='from_group_id', example='abc'),
  toGroupId: string(name='to_group_id', description='to_group_id', example='bcd'),
}

/**
 * Merge face group response
 */
model MergeFaceGroupResponse {
  status?: string(name='status'),
  taskId?: string(name='task_id'),
}

/**
 * Parse keywords request
 */
model ParseKeywordsRequest {
  httpheaders?: map[string]string,
  keywords?: string(name='keywords'),
}

/**
 * Parse keywords response
 */
model ParseKeywordsResponse {
  addressLine?: string(name='address_line', description='AddressLine'),
  tags?: [ SystemTag ](name='tags', items='{"$ref":"#/definitions/SystemTag"}'),
  timeRange?: ParseTimeRange(name='time_range'),
}

/**
 * 
 */
model ParseTimeRange {
  end?: string(name='end'),
  start?: string(name='start'),
}

/**
 * 
 */
model RemarksQueryRequest {
  in?: [ string ](name='in', items='{"type":"string"}'),
  notIn?: [ string ](name='not_in', items='{"type":"string"}'),
  notPrefix?: string(name='not_prefix'),
  prefix?: string(name='prefix'),
}

/**
 * Remove story images response
 */
model RemoveStoryImagesResponse {
  driveId?: string(name='drive_id', description='drive_id'),
  fileIds?: [ string ](name='file_ids', description='file_ids', example='a, b, c', items='{"type":"string"}'),
  results?: [ RemoveStoryImagesResultItem ](name='results', items='{"$ref":"#/definitions/RemoveStoryImagesResultItem"}'),
  storyId?: string(name='story_id', description='story_id'),
  successFileIds?: [ string ](name='success_file_ids', description='success_file_ids', items='{"type":"string"}'),
}

/**
 * 
 */
model RemoveStoryImagesResultItem {
  code?: string(name='code', description='code'),
  fileId?: string(name='file_id', description='file_id'),
  isSucceed?: boolean(name='is_succeed', description='is_succeed'),
  message?: string(name='message', description='message'),
}

/**
 * Remove user to subdomain request
 */
model RemoveUserFromSubdomainRequest {
  httpheaders?: map[string]string,
  subdomainId?: string(name='subdomain_id', description='subdomain id'),
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
}

/**
 * remove file from view
 */
model RemoveViewFileRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  driveId?: string(name='drive_id'),
  fileId?: string(name='file_id'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * 
 */
model SearchGroupRequest {
  httpheaders?: map[string]string,
  groupName?: string(name='group_name', description='group_name', example='abc'),
  limit?: int32(name='limit', description='分页获取的数量，默认为100', example=10, format='int32'),
  marker?: string(name='marker', description='游标', example='""'),
  subdomainId?: string(name='subdomain_id', description='列举 subdomain 下的group', example='"b38b5681bd964950ad8bc0f8ea504793"'),
}

/**
 * 
 */
model SearchGroupResponse {
  items?: [ BaseGroupResponse ](name='items', description='items', example='items', items='{"$ref":"#/definitions/BaseGroupResponse"}'),
  nextMarker?: string(name='next_marker', description='next_marker', example='nextmarker'),
}

/**
 * Search image address groups request
 */
model SearchImageAddressGroupsRequest {
  httpheaders?: map[string]string,
  addressLevel?: string(name='address_level', default='city', description='查询的地点级别', example='city'),
  addressNames?: [ string ](name='address_names', description='查询的地点数组', example='杭州市, 北京市', items='{"type":"string"}'),
  brGeoPoint?: string(name='br_geo_point', description='br_geo_point', example='39.121,101.2121'),
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  imageThumbnailProcess?: string(name='image_thumbnail_process', description='image_thumbnail_process', example='image/resize,w_200'),
  tlGeoPoint?: string(name='tl_geo_point', description='tl_geo_point', example='39.121,101.2121'),
  videoThumbnailProcess?: string(name='video_thumbnail_process', description='video_thumbnail_process', example='video/snapshot,t_7000,f_jpg,w_800,h_600,m_fast'),
}

/**
 * 展示地点分组列表
 */
model SearchImageAddressGroupsResponse {
  items?: [ ImageAddressResponse ](name='items', items='{"$ref":"#/definitions/ImageAddressResponse"}'),
}

/**
 * Search user request
 */
model SearchUserRequest {
  httpheaders?: map[string]string,
  email?: string(name='email', description='邮箱', example='abc@ccp.com'),
  limit?: int32(name='limit', default=100, description='每页大小限制', example=10, format='int32', maximum=100, minimum=1),
  marker?: string(name='marker', description='翻页标记', example='marker'),
  nickName?: string(name='nick_name', description='昵称', example='la'),
  phone?: string(name='phone', description='电话号码', example='13700000000'),
  role?: string(name='role', default='user', description='角色', enum='superadmin, admin, user', example='user'),
  status?: string(name='status', default='enabled', description='状态', enum='enabled, disabled', example='enabled'),
  subdomainId?: string(name='subdomain_id', description='subdomain id'),
  userName?: string(name='user_name', description='用户名', example='abc'),
}

/**
 * Unassign facegroup item request
 */
model UnAssignFaceGroupItemRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  faceGroupId: string(name='face_group_id', description='face_group_id', example='abc'),
  fileId: string(name='file_id', description='file_id', example='abc'),
}

/**
 * Update face group info request
 */
model UpdateFaceGroupInfoRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='"101"', pattern='[0-9]+'),
  groupCoverFaceId?: string(name='group_cover_face_id', description='group_cover_face_id', example='"abcdefg"'),
  groupId: string(name='group_id', description='group_id 列举人脸分组接口中获取', example='"group-asdasdasdeop"'),
  groupName?: string(name='group_name', description='group_name', example='"张XX"'),
  remarks?: string(name='remarks', description='remarks', example='"hidden"'),
  remarksArray?: [ string ](name='remarks_array', description='remarks_array', example='hidden, user', items='{"type":"string"}'),
}

/**
 * 更新人脸分组信息结果
 */
model UpdateFaceGroupInfoResponse {
  driveId?: string(name='drive_id', description='drive_id', example='"101"'),
  groupId?: string(name='group_id', description='group_id', example='"group-aas11002ddeac"'),
}

/**
 * 
 */
model UpdateGroupRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='描述', example='"desc-1"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  groupName: string(name='group_name', description='名称', example='"group-1"'),
  isRoot?: boolean(name='is_root', description='是否是根group', example=false),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
}

/**
 * 
 */
model UpdateGroupResponse {
  createdAt?: int64(name='created_at', description='created_at', example=111111, format='int64'),
  description?: string(name='description', description='description', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  groupName?: string(name='group_name', description='group name', example='"name-111"'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=111111, format='int64'),
}

/**
 * 
 */
model UpdateMembershipRequest {
  httpheaders?: map[string]string,
  description?: string(name='description', description='描述', example='"desc-111"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberRole?: string(name='member_role', description='角色， member or admin', example='"member"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  subdomainId?: string(name='subdomain_id', description='subdomain id', example='"b38b5681bd964950ad8bc0f8ea504794"'),
  userId?: string(name='user_id'),
}

/**
 * 
 */
model UpdateMembershipResponse {
  createdAt?: int64(name='created_at', description='created_at', example=1111, format='int64'),
  description?: string(name='description', description='描述', example='"desc-111"'),
  domainId?: string(name='domain_id', description='domain id', example='"bj123"'),
  groupId?: string(name='group_id', description='group id', example='"b38b5681bd964950ad8bc0f8ea504793"'),
  memberRole?: string(name='member_role', description='角色， member or admin', example='"member"'),
  memberType?: string(name='member_type'),
  subGroupId?: string(name='sub_group_id'),
  updatedAt?: int64(name='updated_at', description='updated_at', example=1111, format='int64'),
  userId?: string(name='user_id'),
}

/**
 * Update user request
 */
model UpdateUserRequest {
  httpheaders?: map[string]string,
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  denyChangePasswordBySelf?: boolean(name='deny_change_password_by_self', description='是否能自己修改密码', example=false),
  description?: string(name='description', description='描述信息', example='ccp team user', maxLength=1024),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  groupInfoList?: [ GroupInfo ](name='group_info_list', items='{"$ref":"#/definitions/GroupInfo"}'),
  needChangePasswordNextLogin?: boolean(name='need_change_password_next_login', description='下次登录后是否强制修改密码', example=false),
  nickName?: string(name='nick_name', description='昵称', example='ccpuser'),
  phone?: string(name='phone', description='电话号码', example='13700000000'),
  plainPassword?: string(name='plain_password', description='用户明文密码', example='123456'),
  role?: string(name='role', default='user', description='角色', enum='superadmin, admin, user', example='user'),
  status?: string(name='status', default='enabled', description='状态', enum='enabled, disabled', example='enabled'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId: string(name='user_id', description='用户 ID', example='ccpuserid'),
}

/**
 * Update user response
 */
model UpdateUserResponse {
  avatar?: string(name='avatar', description='头像', example='http://a.b.c/ccp.jpg'),
  createdAt?: int64(name='created_at', description='用户创建时间', example=1567407718386, format='int64'),
  defaultDriveId?: string(name='default_drive_id', description='默认 Drive ID', example='123'),
  denyChangePasswordBySelf?: boolean(name='deny_change_password_by_self', description='禁止用户自行修改密码'),
  description?: string(name='description', description='用户备注信息', example='ccp team user'),
  domainId?: string(name='domain_id', description='Domain ID', example='hz999'),
  email?: string(name='email', description='邮箱', example='123@ccp.com'),
  needChangePasswordNextLogin?: boolean(name='need_change_password_next_login', description='下次登录强制修改密码'),
  nickName?: string(name='nick_name', description='昵称', example='abc'),
  permission?: object(name='permission', additionalProperties='{"$ref":"#/definitions/IDPermission"}'),
  phone?: string(name='phone', description='电话', example='13700000000'),
  punishFlag?: int64(name='punish_flag', description='用户处罚标志', format='int64'),
  role?: string(name='role', description='角色', example='user'),
  status?: string(name='status', description='用户状态', example='enabled'),
  updatedAt?: int64(name='updated_at', description='用户修改时间', example=1567407718386, format='int64'),
  userData?: object(name='user_data', additionalProperties='{"type":"object"}', description='用户自定义数据，格式为json，可用于配置项、少量临时数据等存储，不超过1K', example='{ is_student: true }'),
  userId?: string(name='user_id', description='用户 ID', example='ccpuserid'),
  userName?: string(name='user_name', description='用户名称', example='name'),
}

/**
 * Update view request
 */
model UpdateViewRequest {
  httpheaders?: map[string]string,
  category: string(name='category', description='category', example='"album"'),
  description?: string(name='description', description='description', example='"abc"'),
  exFieldsInfo?: object(name='ex_fields_info', additionalProperties='{"type":"object"}', description='ex_fields_info'),
  fileCount?: int64(name='file_count', description='description', example=10, format='int64'),
  name?: string(name='name', description='name', example='"abc"'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * 
 */
model ViewFileBaseRequest {
  category: string(name='category', description='category', example='"album"'),
  driveId?: string(name='drive_id'),
  userId?: string(name='user_id', description='user_id', example='"abc"'),
  viewId: string(name='view_id', description='view_id', example='123'),
}

/**
 * 
 */
model ViewFileItem {
  actionList?: [ string ](name='action_list', description='action_list', items='{"type":"string"}'),
  category?: string(name='category', description='category', enum='doc, image, audio, video', example='doc'),
  characteristicHash?: string(name='characteristic_hash', description='CharacteristicHash'),
  contentHash?: string(name='content_hash', description='Content Hash', example='EA4942AA8761213890A5C386F88E6464D2C31CA3'),
  contentHashName?: string(name='content_hash_name', description='content_hash_name', enum='sha1', example='sha1'),
  contentType?: string(name='content_type', description='content_type', example='application/json'),
  crc64Hash?: string(name='crc64_hash', description='crc64_hash'),
  createdAt?: string(name='created_at', description='created_at', example='2019-08-20T06:51:27.292Z'),
  customField1?: string(name='custom_field_1', description='custom_field_1'),
  customField2?: string(name='custom_field_2', description='custom_field_2'),
  customType?: string(name='custom_type', description='custom_type'),
  description?: string(name='description', description='description', example='file description'),
  domainId?: string(name='domain_id', description='DomainID', example='test001', pattern='[a-z0-9A-Z]+'),
  downloadUrl?: string(name='download_url', description='download_url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  encryptMode?: string(name='encrypt_mode', description='encrypt_mode', example='pin'),
  fields?: object(name='fields', additionalProperties='{"type":"object"}'),
  fileExtension?: string(name='file_extension', description='file_extension', example='jpg'),
  fileId?: string(name='file_id', description='file_id', example='5d5b846942cf94fa72324c14a4bda34e81da635d', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  fileRevisionId?: string(name='file_revision_id'),
  hidden?: boolean(name='hidden', description='Hidden
type: boolean', enum='false, true', example=false),
  imageMediaMetadata?: ImageMediaResponse(name='image_media_metadata'),
  joinedAt?: int64(name='joined_at', format='int64'),
  labels?: [ string ](name='labels', description='labels', example='label1:1, label2:2', items='{"type":"string"}'),
  lastModifierId?: string(name='last_modifier_id', description='last_modifier_id', example='123abc'),
  lastModifierName?: string(name='last_modifier_name', description='last_modifier_name', example='test_user'),
  lastModifierType?: string(name='last_modifier_type', description='last_modifier_type', example='User, AliUser'),
  meta?: string(name='meta'),
  mimeExtension?: string(name='mime_extension', description='mime_extension', example='mov'),
  mimeType?: string(name='mime_type', description='mime_type', example='video/quicktime'),
  name: string(name='name', description='name', example='ccp.jpg', pattern='[a-zA-Z0-9.-]{1,1000}'),
  parentFileId?: string(name='parent_file_id', description='parent_file_id', example='root', maxLength=50, minLength=40, pattern='[a-z0-9]{1,50}'),
  punishFlag?: int64(name='punish_flag', description='PunishFlag', format='int64'),
  shareId?: string(name='share_id'),
  size?: int64(name='size', description='Size', example=1024, format='int64', minimum=0),
  starred?: boolean(name='starred', description='starred
type: boolean', example=false),
  status?: string(name='status', description='status', enum='uploading, available', example='available'),
  streamsInfo?: object(name='streams_info', additionalProperties='{"$ref":"#/definitions/SimpleStreamInfo"}', description='@Deprecated streams url info'),
  thumbnail?: string(name='thumbnail', description='thumbnail', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  trashedAt?: string(name='trashed_at', description='trashed_at', format='date-time'),
  type?: string(name='type', description='type', enum='file, folder', example='file'),
  updatedAt?: string(name='updated_at', description='updated_at', format='date-time'),
  uploadId?: string(name='upload_id', description='upload_id', example='C9DCFE5A82644AC7A02DB74C30C934A6'),
  url?: string(name='url', description='url', example='https://ccp.data.aliyuncs.com/hz22%2F5d5b986facbec311ef844c25954f96821497b383%2F5d5b986f955410dd991646bb87c6b4e899eff525?Expires=xxx&OSSAccessKeyId=xxx&Signature=xxx'),
  userMeta?: string(name='user_meta', description='user_meta', example='user_meta'),
  userTags?: object(name='user_tags', additionalProperties='{"type":"string"}', description='user_tags'),
  videoMediaMetadata?: VideoMediaResponse(name='video_media_metadata'),
  videoPreviewMetadata?: VideoPreviewResponse(name='video_preview_metadata'),
  viewId?: string(name='view_id'),
}

/**
 * DomainSummaryResponse
 */
model DomainSummaryResponse {
  driveCount?: int64(name='drive_count', description='drive_count', example=1, format='int64'),
  fileCount?: int64(name='file_count', description='file_count', example=1, format='int64'),
  state?: string(name='state', description='state'),
  statisticsTime?: int64(name='statistics_time', description='statistics_time', format='int64'),
  usedSize?: int64(name='used_size', description='used_size', example=1, format='int64'),
  userCount?: int64(name='user_count', description='user_count', example=1, format='int64'),
}

/**
 * 查询 domain 概况
 */
model GetDomainSummaryRequest {
  httpheaders?: map[string]string,
}

/**
 * 查询 Drive 使用空间
 */
model GetDriveUsedSizeRequest {
  httpheaders?: map[string]string,
  driveId: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  subdomainId?: string(name='subdomain_id', description='subdomain'),
}

/**
 * GetDriveUsedSizeResponse
 */
model GetDriveUsedSizeResponse {
  usedSize?: int64(name='used_size', description='used_size', example=1, format='int64'),
}

/**
 * 查询 Domain 或 Drive 下文件数
 */
model GetFileCountRequest {
  httpheaders?: map[string]string,
  driveId?: string(name='drive_id', description='drive_id', example='1', pattern='[0-9]+'),
  fileExt?: string(name='file_ext', description='file_ext', example='jpg'),
  subdomainId?: string(name='subdomain_id', description='subdomain'),
}

/**
 * GetFileCountResponse
 */
model GetFileCountResponse {
  fileCount?: int64(name='file_count', description='file_count', example=1, format='int64'),
}

/**
 * 查询 subdomain 概况
 */
model GetSubdomainSummaryRequest {
  httpheaders?: map[string]string,
  subdomainId?: string(name='subdomain_id', description='subdomain'),
}

/**
 * SubdomainSummaryResponse
 */
model SubdomainSummaryResponse {
  driveCount?: int64(name='drive_count', description='drive_count', example=1, format='int64'),
  state?: string(name='state', description='state'),
  statisticsTime?: int64(name='statistics_time', description='statistics_time', format='int64'),
  usedSize?: int64(name='used_size', description='used_size', example=1, format='int64'),
  userCount?: int64(name='user_count', description='user_count', example=1, format='int64'),
}

function getPathname(nickname: string, path: string): string {
  if (Util.empty(nickname)) {
    return path;
  }
  return `/${nickname}${path}`;
}

async function setExpireTime(expireTime: string): void{
  if (Util.isUnset(@accessTokenCredential)) {
    return;
  }
  @accessTokenCredential.setExpireTime(expireTime);
}

function getExpireTime(): string{
  if (Util.isUnset(@accessTokenCredential)) {
    return '';
  }
  var expireTime = @accessTokenCredential.getExpireTime();
  return expireTime;
}

function setRefreshToken(token: string): void{
  if (Util.isUnset(@accessTokenCredential)) {
    return;
  }
  @accessTokenCredential.setRefreshToken(token);
}

function getRefreshToken(): string{
  if (Util.isUnset(@accessTokenCredential)) {
    return '';
  }
  var token = @accessTokenCredential.getRefreshToken();
  return token;
}

function setAccessToken(token: string): void{
  if (Util.isUnset(@accessTokenCredential)) {
    return;
  }
  @accessTokenCredential.setAccessToken(token);
}

async function getAccessToken(): string{
  if (Util.isUnset(@accessTokenCredential)) {
    return '';
  }
  var token = @accessTokenCredential.getAccessToken();
  return token;
}

function setUserAgent(userAgent: string): void {
  @userAgent = userAgent;
}

function appendUserAgent(userAgent: string): void {
  @userAgent = `${@userAgent} ${userAgent}`;
}

function getUserAgent(): string {
  var userAgent =  Util.getUserAgent(@userAgent);
  return userAgent;
}

async function getAccessKeyId(): string{
  if (Util.isUnset(@credential)) {
    return '';
  }
  var accessKeyId = @credential.getAccessKeyId();
  return accessKeyId;
}

async function getAccessKeySecret(): string{
  if (Util.isUnset(@credential)) {
    return '';
  }
  var secret = @credential.getAccessKeySecret();
  return secret;
}

async function getSecurityToken(): string{
  if (Util.isUnset(@credential)) {
    return '';
  }
  var token = @credential.getSecurityToken();
  return token;
}

